arnowelzel / lightbox-photoswipe

Integration of PhotoSwipe to WordPress
https://arnowelzel.de/wp/en/projects/wordpress/lightbox-with-photoswipe
GNU General Public License v2.0
27 stars 7 forks source link

PHP Warning: extract() expects parameter 1 to be array, bool given #86

Closed aharonach closed 2 years ago

aharonach commented 2 years ago

Hello there,

I'm getting lots of PHP warnings as follows: PHP Warning: extract() expects parameter 1 to be array, bool given in /public_html/wp-content/plugins/lightbox-photoswipe/lightbox-photoswipe.php on line 685

Since not all my images on the website are hosted locally, some of them are from external servers, so my server redirects the request to the external server. Your plugin tries to get some info of the image and it fails because of the reason I've written here.

The problematic line is extract( $imgDetails );. The solution should be to set an initial value to that variable at the beginning of the method, something like: $imgDetails = array();.

Hope you'll fix that soon! 😄

aharonach commented 2 years ago

Hi again, just noticed that it was fixed in the last version. Thank you very much!

arnowelzel commented 2 years ago

Yes - this bug was introduced when refactoring the backend code and I already have seen this just after publishing the update. Sorry for the confusion.