Piwigo version: 2.8.4
PHP version: 7.1
MySQL version: 5.6
Hi
I tried to enable PHP 7.1 today and run into problem in template.class.php
you would see something like
Warning: A non-numeric value encountered in .../include/template.class.php on line 1791
This version of PHP is more strict with left/right values math expressions.
Ex: '' + 0 would cause warning above
Fix is quite trivial and seems to work in my hotpatch
```
$ret = intval($s1->load_mode) - intval($s2->load_mode);
```
Piwigo version: 2.8.4
PHP version: 7.1
MySQL version: 5.6
<!-- github-sync-id:198173245 -->
Hi
I did install latest release without making further changes to the code to fix it
So it appears to be working
From: Pierrick Le Gall [mailto:notifications@github.com]
Sent: Tuesday, May 23, 2017 9:36 AM
To: Piwigo/Piwigo <Piwigo@noreply.github.com>
Cc: SergeD <webmaster@dragonsoft.us>; Mention <mention@noreply.github.com>
Subject: Re: [Piwigo/Piwigo] PHP 7.1 and template.class.php incompatability (#596)
@SergeD <https://github.com/serged> is it still an issue with latest PHP 7.1 version ? (7.1.5 was released on May 11th 2017)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <https://github.com/Piwigo/Piwigo/issues/596#issuecomment-303459860> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AAGmI9KmBnlK0XjFCPgSQdRkZGHWwzwlks5r8wrqgaJpZM4LYTCT> . <https://github.com/notifications/beacon/AAGmI3l5gLtI2qpRO8KqEqLKIi61BpJlks5r8wrqgaJpZM4LYTCT.gif>
<!-- github-comment-id:303579116 -->
I encountered this same issue and had to make the change SergeD did by changing line 1791 from $ret = $s1->load_mode - $s2->load_mode;
to
$ret = intval($s1->load_mode) - intval($s2->load_mode);
Which fixes the issue but using the latest version should also fix it right?
> Piwigo 2.9.1
> Operating system: Linux
> PHP: 7.1.4 (Show info) [2017-06-28 00:16:50]
> MySQL: 5.5.56-MariaDB [2017-06-28 02:16:50]
> Graphics Library: GD bundled (2.1.0 compatible)
I encountered this same issue and had to make the change SergeD did by changing line 1791 from
` $ret = $s1->load_mode - $s2->load_mode;`
to
` $ret = intval($s1->load_mode) - intval($s2->load_mode);`
Which fixes the issue but using the latest version should also fix it right?
<!-- github-comment-id:311521361 -->
Run in the same issue after upgrade to Piwigo 2.9.1 and solved with the change SergeD did by changing line 1791.
Thanks for the recipe!
Piwigo 2.9.1
Operating system: Linux
PHP: 7.1.7 (Show info) [2017-07-07 21:26:42]
MySQL: 5.5.5-10.2.6-MariaDB [2017-07-07 21:26:42]
Graphics Library: GD 2.2.4
Run in the same issue after upgrade to Piwigo 2.9.1 and solved with the change SergeD did by changing line 1791.
Thanks for the recipe!
<!-- github-comment-id:313773270 -->
Hi,
this issue should be reopened and the patch merged as the problem is still present (as I discovered it while migrating from php 7.0 to 7.1)
Piwigo 2.9.2
PHP: 7.1.13-1
Hi,
this issue should be reopened and the patch merged as the problem is still present (as I discovered it while migrating from php 7.0 to 7.1)
```
Piwigo 2.9.2
PHP: 7.1.13-1
```
<!-- github-comment-id:364653508 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Hi
I tried to enable PHP 7.1 today and run into problem in template.class.php
you would see something like
Warning: A non-numeric value encountered in .../include/template.class.php on line 1791
This version of PHP is more strict with left/right values math expressions.
Ex: '' + 0 would cause warning above
Fix is quite trivial and seems to work in my hotpatch
Piwigo version: 2.8.4
PHP version: 7.1
MySQL version: 5.6
@SergeD is it still an issue with latest PHP 7.1 version ? (7.1.5 was released on May 11th 2017)
Hi
I did install latest release without making further changes to the code to fix it
So it appears to be working
From: Pierrick Le Gall [mailto:notifications@github.com]
Sent: Tuesday, May 23, 2017 9:36 AM
To: Piwigo/Piwigo Piwigo@noreply.github.com
Cc: SergeD webmaster@dragonsoft.us; Mention mention@noreply.github.com
Subject: Re: [Piwigo/Piwigo] PHP 7.1 and template.class.php incompatability (#596)
@SergeD https://github.com/serged is it still an issue with latest PHP 7.1 version ? (7.1.5 was released on May 11th 2017)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/Piwigo/Piwigo/issues/596#issuecomment-303459860 , or mute the thread https://github.com/notifications/unsubscribe-auth/AAGmI9KmBnlK0XjFCPgSQdRkZGHWwzwlks5r8wrqgaJpZM4LYTCT . https://github.com/notifications/beacon/AAGmI3l5gLtI2qpRO8KqEqLKIi61BpJlks5r8wrqgaJpZM4LYTCT.gif
Great :-) let's close this issue then!
I encountered this same issue and had to make the change SergeD did by changing line 1791 from
$ret = $s1->load_mode - $s2->load_mode;to
$ret = intval($s1->load_mode) - intval($s2->load_mode);Which fixes the issue but using the latest version should also fix it right?
Run in the same issue after upgrade to Piwigo 2.9.1 and solved with the change SergeD did by changing line 1791.
Thanks for the recipe!
Hi,
this issue should be reopened and the patch merged as the problem is still present (as I discovered it while migrating from php 7.0 to 7.1)
And still present in piwigo 2.9.3