aelvan / Imager-Craft

This plugin has been DEPRECATED. Check out Imager X instead.
MIT License
342 stars 69 forks source link

Error with Imgix transformer when passing an AssetTransform object #237

Closed benface closed 5 years ago

benface commented 5 years ago

Repro steps

  1. Use the following Imager settings:
    'transformer' => 'imgix',
    'useForNativeTransforms' => true,
    'imgixProfile' => 'default',
    'imgixApiKey' => getenv('IMGIX_API_KEY'),
    'imgixConfig' => [
        'default' => [
            'domains' => ['yourdomain.imgix.net'],
            'signKey' => getenv('IMGIX_SIGN_KEY'),
        ],
    ],
  2. Create a test transform in the CP, with any settings.
  3. Run this template (you gotta have at least one asset in the DB):
    {{ craft.app.assets.getAssetUrl(craft.assets.one(), craft.app.assetTransforms.getTransformByHandle('test')) }}

Expected result: No error. Actual result:

yii\base\ErrorException: rawurlencode() expects parameter 1 to be string, array given in /Users/benface/Desktop/Freelance/project/vendor/imgix/imgix-php/src/Imgix/UrlHelper.php:74
aelvan commented 5 years ago

This was fixed in v2.1.10, thanks for reporting!

benface commented 5 years ago

Wow! That was quick. Thank you very much!