Closed tcicit closed 7 years ago
Thanks for the report.
Note : related to #2 and reported in picocms/picocms.github.io/pull/13
I just saw that array_pad
return [0], [1], [2], [3] and [mime]
😫 .
So no offset 4 to be used with list
.
https://secure.php.net/manual/en/function.getimagesize.php#example-3516
Mime isn't used anyway, so the fix should be, for line 85 :
list($width, $height, $type, $size) = array_pad($imagesize, 4, '');
Could you test that ?
Ok this is working. My quick and ugly solution was the following.
if( !isset( $imagesize[0])) { $imagesize[0] = 0; } if( !isset( $imagesize[1])) { $imagesize[1] = 0; } if( !isset( $imagesize[2])) { $imagesize[2] = 0; } if( !isset( $imagesize[3])) { $imagesize[3] = 0; } if( !isset( $imagesize[4])) { $imagesize[4] = 0; }
But I'm not a PHP programmer.
Great, but couldn't you use the change I gave above for the line 85 ?
Yes :-) everything is OK
At the moment I am working on a small template for a gallery and use your plugin. Nice work :-) https://github.com/tcicit/pico-gallery
Wonderful, I apply the changes 😃
The plugin works so far quite well. But I get the following error with each picture in the list.
Notice: Undefined offset: 4 in D:\xampp\htdocs\pico\plugins\PicoPagesImages.php on line 85