maloja / pico-fotofolder

A masonry like gallery for Pico CMS
MIT License
5 stars 1 forks source link

Broken on alpine:3.11 (docker) #2

Open jceloria opened 3 years ago

jceloria commented 3 years ago
/ # apk -vv info | grep -E '^(apache2-[0-9]|php7-[0-9])'
apache2-2.4.43-r0 - A high performance Unix-based HTTP server
php7-7.3.18-r0 - The PHP7 language runtime engine
[Wed Dec 09 20:45:28.462029 2020] [php7:notice] [pid 206] [client 184.21.64.185:50523] PHP Notice:  Undefined offset: 1 in /var/www/<redacted>/plugins/PicoFotofolder/PicoFotofolder.php on line 40
[Wed Dec 09 20:45:28.462088 2020] [php7:notice] [pid 206] [client 184.21.64.185:50523] PHP Notice:  Undefined offset: 2 in /var/www/<redacted>/plugins/PicoFotofolder/PicoFotofolder.php on line 40
[Wed Dec 09 20:45:28.462244 2020] [php7:warn] [pid 206] [client 184.21.64.185:50523] PHP Warning:  Use of undefined constant GLOB_BRACE - assumed 'GLOB_BRACE' (this will throw an Error in a future version of PHP) in /var/www/<redacted>/plugins/PicoFotofolder/PicoFotofolder.php on line 106
[Wed Dec 09 20:45:28.462266 2020] [php7:warn] [pid 206] [client 184.21.64.185:50523] PHP Warning:  glob() expects parameter 2 to be int, string given in /var/www/<redacted>/plugins/PicoFotofolder/PicoFotofolder.php on line 106
[Wed Dec 09 20:45:28.462300 2020] [php7:warn] [pid 206] [client 184.21.64.185:50523] PHP Warning:  usort() expects parameter 1 to be array, null given in /var/www/<redacted>/plugins/PicoFotofolder/PicoFotofolder.php on line 107
[Wed Dec 09 20:45:28.462308 2020] [php7:warn] [pid 206] [client 184.21.64.185:50523] PHP Warning:  Invalid argument supplied for foreach() in /var/www/<redacted>/plugins/PicoFotofolder/PicoFotofolder.php on line 116

I found this: https://github.com/zendframework/zend-stdlib/issues/58

maloja commented 3 years ago

Thanks for your hint about the behavoir of musl libc. I'll see if i can fix this. At the moment i have no alpine environment. Affected Line:

 $filelist = glob($dir . '/' . $pattern, GLOB_BRACE);
        usort($filelist, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));