Announcement

#1 2023-12-17 11:39:29

executive
Member
2017-08-16
1214

PHP 8 warnings

lots of this over and over in my php error log.



Code:

[17-Dec-2023 02:35:09 America/Vancouver] PHP Warning:  Undefined array key "comments" in /home/mountain/public_html/gallery/_data/templates_c/vpu31w^337775656e9f1f21ea6afe4b0a9fde86dfa4ae78_0.file.comment_list.tpl.php on line 47
[17-Dec-2023 02:35:09 America/Vancouver] PHP Warning:  Attempt to read property "value" on null in /home/mountain/public_html/gallery/_data/templates_c/vpu31w^337775656e9f1f21ea6afe4b0a9fde86dfa4ae78_0.file.comment_list.tpl.php on line 47

Environment

    Piwigo 13.8.0 Check for upgrade
    Installed on 7 June 2017, 6 years 6 months 1 week 2 days ago
    Operating system: Linux
    PHP: 8.1.26 (Show info) [2023-12-17 02:38:57]
    MySQL: 8.0.35 [2023-12-17 02:38:57]
    Graphics Library: ImageMagick 7.1.0-62
    Cache size 910.88 Mo   calculated 5 months ago Refresh

Activated plugin list 27

    Admin Tools
    Automatic Size
    Batch Downloader
    Batch Manager Prefilters
    Batch Manager, Added By
    Batch Manager, Description
    Change who added photo
    Check Files Integrity
    Check Uploads
    Community
    Embedded Videos
    Exif View
    Grum Plugins Classes.3
    LocalFiles Editor
    Permalink Generator
    Personal Favicon
    Personal Plugin
    Photo added by
    Posted Date Changer
    prevnext
    Read Metadata
    RV Akismet
    RV DB Integrity
    See photos by user
    SmartAlbums
    Take A Tour of Your Piwigo
    Update Album

Offline

 

#2 2023-12-17 13:35:11

k5
Member
2017-11-05
68

Re: PHP 8 warnings

Hello

it's corrected with piwigo 14

Offline

 

#3 2023-12-17 14:17:42

k5
Member
2017-11-05
68

Re: PHP 8 warnings

Witch theme ?

Offline

 

#4 2023-12-17 14:31:16

erAck
Only trying to help
2015-09-06
2054

Re: PHP 8 warnings

@executive: view the /home/mountain/public_html/gallery/_data/templates_c/vpu31w^337775656e9f1f21ea6afe4b0a9fde86dfa4ae78_0.file.comment_list.tpl.php file, in its 3rd line it states from which template file it was generated.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2023-12-17 21:08:59

executive
Member
2017-08-16
1214

Re: PHP 8 warnings

thanks erack. Looks like modus.

Code:

/* Smarty version 4.1.0, created on 2023-12-17 02:40:34
  from '/home/mountain/public_html/gallery/themes/modus/template/comment_list.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */

Offline

 

#6 2023-12-17 21:15:43

executive
Member
2017-08-16
1214

Re: PHP 8 warnings

k5 wrote:

Hello

it's corrected with piwigo 14

https://i.postimg.cc/vYM7jcmR/Screenshot-2023-12-17-at-12-14-20-Piwigo-13-0-0-Release-note.png

Offline

 

#7 2023-12-17 23:11:58

k5
Member
2017-11-05
68

Re: PHP 8 warnings

Modus

https://i.imgur.com/VGYbHmm.jpg

Offline

 

#8 2023-12-18 00:10:19

executive
Member
2017-08-16
1214

Re: PHP 8 warnings

k5 wrote:

Modus

What is your point?
The one I have should work.

Last edited by executive (2023-12-18 00:11:11)

Offline

 

#9 2023-12-18 00:20:25

k5
Member
2017-11-05
68

Re: PHP 8 warnings

hello

executive wrote:

k5 wrote:

Modus

What is your point?
The one I have should work.

If piwigo 13.8 installed so modus 13.8
If piwigo 14 installed so modus 14

Last edited by k5 (2023-12-18 00:20:45)

Offline

 

#10 2023-12-18 00:53:45

executive
Member
2017-08-16
1214

Re: PHP 8 warnings

???

Offline

 

#11 2023-12-18 07:10:36

noramila
Member
India
2023-08-29
8

Re: PHP 8 warnings

Upgrade to piwigo 14 to fix the PHP 8 warnings about undefined array keys in your log. It appears that this issue has been addressed in the newer version.

Offline

 

#12 2023-12-19 04:44:15

executive
Member
2017-08-16
1214

Re: PHP 8 warnings

No thanks. Not a guinea pig.
I prefer to use 13.8 for now, which should be compatible with php 8.

Offline

 

#13 2023-12-19 11:20:16

executive
Member
2017-08-16
1214

Re: PHP 8 warnings

Well I tried clearing the template_c directory and that didn't help.

I tried manually installing modus 14, and that didn't help either.

This is the offending line:

Code:

$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['comments']->value, 'comment', false, NULL, 'comment_loop', array (

For now I just disabled warnings in php error reporting

Last edited by executive (2023-12-19 11:54:14)

Offline

 

#14 2023-12-20 10:00:00

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13795

Re: PHP 8 warnings

executive wrote:

No thanks. Not a guinea pig.
I prefer to use 13.8 for now, which should be compatible with php 8.

Well... I understand you're not fully ready to update your Piwigo to Piwigo 14.0.0. But considering those who are ready to be "guinea pigs" is exaggerated ;-)

The problem on comment_list.tpl has always been present with PHP 8 and has been fixed in Piwigo 14. We don't plan to backport it for a version 13.9.0. Too much work for such a fix. I wouldn't say the same for a security issue.

If you don't want to be a guinea pig on a stable release, maybe you'll be more inclined to participate in the beta-testing stages for Piwigo 15 :-)

Offline

 

#15 2023-12-20 10:02:12

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13795

Re: PHP 8 warnings

By the way, the fix is in Piwigo, not in themes. See [Github] Piwigo commit 85a6b11d

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact