10up / safe-svg

Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
https://wordpress.org/plugins/safe-svg/
GNU General Public License v2.0
263 stars 31 forks source link

Fix/194 PHP Deprecated Warning #203

Closed faisal-alvi closed 2 months ago

faisal-alvi commented 2 months ago

Description of the Change

This PR handles the case where the image_meta is not an array and sets it to an empty array to avoid PHP warnings.

Closes #194

How to test the Change

As this is not a straightforward issue so it is difficult to write steps to regenerate the issue.

Changelog Entry

Fixed - Fixed - Handled PHP warning when the $image_meta is not an array.

Credits

Props @drazenbebic, @kirtangajjar, @faisal-alvi , @dkotter

Checklist: