Closed 1e-9 closed 1 year ago
The code snippet is displayed incorrectly. Next try:
I got the same bug in the information/details tab. I found it annoying so I started searching for the bug:
In the file picture.inc.php, line 63, it says
{if $OSMJS}
If you replace it with
{if isset($OSMJS)}
the error will go away and you'll not see a map if there is no data available, instead of the error. You can change it yourself (purge your compiled templates if you do). I have not searched for any other ifs, that might give the same problem, as I only use the map on the information/details tab...
same here: Piwigo 13.8.0, PHP 8.1.21
Pictures without GPS-information produce the following output when PHP 8.0 is activted:
Warning: Undefined array key "OSMJS" in /mnt/web115/a1/12/5421712/htdocs/piwigo/_data/templates_c/ljbwkp_bvtu6z^fd619a386ec1e7d13faef95df7bba10d138ce7b7_0.file.picture.tpl.php on line 327 Warning: Attempt to read property "value" on null in /mnt/web115/a1/12/5421712/htdocs/piwigo/_data/templates_c/ljbwkp_bvtu6z^fd619a386ec1e7d13faef95df7bba10d138ce7b7_0.file.picture.tpl.php on line 327
The named file contains this code from line 326:
if ($_smarty_tpl->tpl_vars['display_info']->value['rating_score'] && (isset($_smarty_tpl->tpl_vars['rate_summary']->value))) { if ($_smarty_tpl->tpl_vars['OSMJS']->value) {?>