variar / grav-plugin-unitegallery

Grav plugin to create image galleries with unitegallery js library
MIT License
19 stars 5 forks source link

PHP 7.2.10 Exception "undefined constant basename" #23

Open Fr33z3m4n opened 5 years ago

Fr33z3m4n commented 5 years ago

Hi,

with PHP 7.2.10 define Warnings are now thrown as Exception. With your Plugin, an Exception is thrown.

File: unitegallery_extension.php $output .= '<img alt="' . $image[basename] . '"'; $output .= ' data-description="' . $image[basename] . '"';

Change to: $output .= '<img alt="' . $image['basename'] . '"'; $output .= ' data-description="' . $image['basename'] . '"';

will be resolve this Exception:

0 - An exception has been thrown during the rendering of a template ("Use of undefined constant basenme - assumed 'basename' (this will throw an Error in a future version of PHP)") in "@Page:/.........." at line 1.