Skip to content

Conversation

@cjhaas
Copy link

@cjhaas cjhaas commented Jul 17, 2020

The WordPress function image_resize_dimensions returns false on failure. The code in /includes/resizer.php on line 101 attempts to read from the function result with the assumption that it worked. If that function fails, the notice message PHP Notice: Trying to access array offset on value of type bool in is raised.

Later on in line 105 there is a correct check for function failure.

This patch moves the array access later when it is safe to assume that the function has returned an array value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant