Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal offset in isset() #143

Open
johnbillion opened this issue Apr 9, 2021 · 1 comment
Open

Illegal offset in isset() #143

johnbillion opened this issue Apr 9, 2021 · 1 comment
Labels
bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now

Comments

@johnbillion
Copy link
Member

johnbillion commented Apr 9, 2021

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:

if ( ! isset( $sizes[ $size ] ) ) {

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

@johnbillion johnbillion added the bug Existing functionality isn't behaving as expected label Apr 9, 2021
@roborourke
Copy link
Contributor

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 roborourke added the should have Should be done, medium priority for now label Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now
Projects
None yet
Development

No branches or pull requests

3 participants