Skip to content

Vendi fixing image resize dimensions bug#93

Open
cjhaas wants to merge 3 commits intothemejunkie:masterfrom
vendi-advertising:vendi-fixing-image_resize_dimensions-bug
Open

Vendi fixing image resize dimensions bug#93
cjhaas wants to merge 3 commits intothemejunkie:masterfrom
vendi-advertising:vendi-fixing-image_resize_dimensions-bug

Conversation

@cjhaas
Copy link
Copy Markdown

@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