aelvan / Imager-Craft

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

Object of class DateTime could not be converted to string #257

Closed boscho87 closed 5 years ago

boscho87 commented 5 years ago

https://github.com/aelvan/Imager-Craft/blob/craft3/src/helpers/ImagerHelpers.php#L370 causes this error!

a simple if(isstring($v)){} around this line solved the issue for me....

What could be the Problem here?

I Updated from Craft2 to Craft-3.2 i did not Change anything in the Templates

aelvan commented 5 years ago

You're passing a DateTime object to one of the transform properties. Maybe you're using a field value for something, and the return value of the field has changed? The solution is to not do that - an if would just hide the underlying problem.

boscho87 commented 5 years ago

sorry did not know much about the plugin.... my former co-worker installed it.... could fixt it with a simple array_filter on the transform object.