smart-media icon indicating copy to clipboard operation
smart-media copied to clipboard

Illegal offset in `isset()`

Open johnbillion opened this issue 3 years ago • 1 comments

I haven't tracked it down yet but I'm seeing the following error in my logs:

PHP Warning:  Illegal offset type in isset or empty in /usr/src/app/vendor/humanmade/smart-media/inc/cropper/namespace.php on line 1257

This is the line in question:

https://github.com/humanmade/smart-media/blob/3282fb0331b1d592105b89d1a7a440a5146ea342/inc/cropper/namespace.php#L1257

The $size parameter here can be an array, which would cause this error.

johnbillion avatar Apr 09 '21 14:04 johnbillion

We check if it's an array and return it in the lines above so it shouldn't be that. It would be good you were able to step debug and see what value of $size causes this if it's easily reproducible. My money is on a null or false value, I don't think we handle that possibility right now.

roborourke avatar Apr 16 '21 13:04 roborourke