I ran into this message after upgrading to php 7.3 : Deprecated function: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior.
The fix is to change the file jshrink.class.php :
line 195
if(strpos('(-+{[@', chr($this->b)) !== false)
line 254
if(($this->b == '/' && strpos('(,=:[!&|?', chr($this->a)) !== false))
Regards
Bruno
I ran into this message after upgrading to php 7.3 : Deprecated function: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior.
The fix is to change the file jshrink.class.php :
- line 195
if(strpos('(-+{[@', chr($this->b)) !== false)
- line 254
if(($this->b == '/' && strpos('(,=:[!&|?', chr($this->a)) !== false))
Regards
Bruno
<!-- github-sync-id:421643269 -->
we implement the minimum change on jshrink.class.php to work on PHP 7.3 and we can have it for Piwigo 2.9.5 (coming very very soon)
we completely update jshrink.class.php to latest version, as suggested by @tkuther but we wait for Piwigo 2.10
both
Hi @brunobydesign
Your issue is related to #951
I see 2 options here:
1) we implement the minimum change on `jshrink.class.php` to work on PHP 7.3 and we can have it for Piwigo 2.9.5 (coming very very soon)
2) we completely update `jshrink.class.php` to latest version, as suggested by @tkuther but we wait for Piwigo 2.10
3) both
<!-- github-comment-id:479822524 -->
For now, I only fixed the compatibility with PHP 7.3 based on https://github.com/tedious/JShrink/commit/91105810dafedba0390608d7465abd602beb6410
cc @tkuther
<!-- github-comment-id:480871208 -->
@plegall sorry I didn't answer to your previous post. This is the only issue Piwigo had with php 7.3 as far as i can tell, since my site is running ok since 3 weeks, so, imho, it is worthwhile using a quick fix and ship, to let people who want it move on to 7.3.
Regads
Bruno
@plegall sorry I didn't answer to your previous post. This is the only issue Piwigo had with php 7.3 as far as i can tell, since my site is running ok since 3 weeks, so, imho, it is worthwhile using a quick fix and ship, to let people who want it move on to 7.3.
Regads
Bruno
<!-- github-comment-id:480889305 -->
To give a little detail, please note that I didn't have this error message on PHP 7.3.1. It appeared only when I updated to PHP 7.3.3.
To give a little detail, please note that I didn't have this error message on PHP 7.3.1. It appeared only when I updated to PHP 7.3.3.
<!-- github-comment-id:481144467 -->
I have tested on PHP 7.3.10 before releasing Piwigo 2.10.0 and no issue at all. This is why I didn't ring any bell in my head! We'll fix#951 for Piwigo 2.10.1
I have tested on PHP 7.3.10 before releasing Piwigo 2.10.0 and no issue at all. This is why I didn't ring any bell in my head! We'll fix #951 for Piwigo 2.10.1
<!-- github-comment-id:539881076 -->
Hm, it looks like this was just an upgrade issue of my darkroom demo instance
No issues on my other instances.
Sorry for the noise :)
Hm, it looks like this was just an upgrade issue of my darkroom demo instance
No issues on my other instances.
Sorry for the noise :)
<!-- github-comment-id:539886750 -->
Hum... did you upgrade your PHP version? Was it just a PHP bug? is updating jshrink to version 1.3.1 required then (considering it has a higher PHP requirement than current version embedded in Piwigo)
Hum... did you upgrade your PHP version? Was it just a PHP bug? is updating jshrink to version 1.3.1 required then (considering it has a higher PHP requirement than current version embedded in Piwigo)
<!-- github-comment-id:539891345 -->
I still had the issue, although I updated jshrink.class.php (again) after 2.10 update. Previously it worked with updated jshrink class.
Edit: The (web) update seems to have run incompletely. Overwriting the installation with the contents of the source tarball, got things moving again.
I still had the issue, *although* I updated jshrink.class.php (again) after 2.10 update. Previously it worked with updated jshrink class.
Edit: The (web) update seems to have run incompletely. Overwriting the installation with the contents of the source tarball, got things moving again.
<!-- github-comment-id:539975359 -->
I upgraded piwigo to version 2.10 today, and I confirm the same message.
<b>Deprecated</b>: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in <b>/var/www/vhosts/xxxxxx.cz/httpdocs/piwigo/include/jshrink.class.php</b> on line <b>195</b><br />;
I upgraded piwigo to version 2.10 today, and I confirm the same message.
<b>Deprecated</b>: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in <b>/var/www/vhosts/xxxxxx.cz/httpdocs/piwigo/include/jshrink.class.php</b> on line <b>195</b><br />;
<!-- github-comment-id:540087278 -->
Hm, seems to be related to GThumb+ here. Plain 2.10 with GThumb+ enabled breaks on category view.
EDIT: no, picture page is broken, too. curl -sSL -o - https://github.com/Piwigo/Piwigo/pull/952.patch | patch -p1
and things start working again
Hm, seems to be related to GThumb+ here. Plain 2.10 with GThumb+ enabled breaks on category view.
EDIT: no, picture page is broken, too.
`curl -sSL -o - https://github.com/Piwigo/Piwigo/pull/952.patch | patch -p1`
and things start working again
<!-- github-comment-id:540090501 -->
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.
I ran into this message after upgrading to php 7.3 : Deprecated function: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior.
The fix is to change the file jshrink.class.php :
line 195
if(strpos('(-+{[@', chr($this->b)) !== false)
line 254
if(($this->b == '/' && strpos('(,=:[!&|?', chr($this->a)) !== false))
Regards
Bruno
Hi @brunobydesign
Your issue is related to #951
I see 2 options here:
jshrink.class.phpto work on PHP 7.3 and we can have it for Piwigo 2.9.5 (coming very very soon)jshrink.class.phpto latest version, as suggested by @tkuther but we wait for Piwigo 2.10For now, I only fixed the compatibility with PHP 7.3 based on https://github.com/tedious/JShrink/commit/91105810dafedba0390608d7465abd602beb6410
cc @tkuther
@plegall cool, thanks!
@plegall sorry I didn't answer to your previous post. This is the only issue Piwigo had with php 7.3 as far as i can tell, since my site is running ok since 3 weeks, so, imho, it is worthwhile using a quick fix and ship, to let people who want it move on to 7.3.
Regads
Bruno
To give a little detail, please note that I didn't have this error message on PHP 7.3.1. It appeared only when I updated to PHP 7.3.3.
Still broken in 2.10
I have tested on PHP 7.3.10 before releasing Piwigo 2.10.0 and no issue at all. This is why I didn't ring any bell in my head! We'll fix #951 for Piwigo 2.10.1
Hm, it looks like this was just an upgrade issue of my darkroom demo instance
No issues on my other instances.
Sorry for the noise :)
Hum... did you upgrade your PHP version? Was it just a PHP bug? is updating jshrink to version 1.3.1 required then (considering it has a higher PHP requirement than current version embedded in Piwigo)
I still had the issue, although I updated jshrink.class.php (again) after 2.10 update. Previously it worked with updated jshrink class.
Edit: The (web) update seems to have run incompletely. Overwriting the installation with the contents of the source tarball, got things moving again.
I upgraded piwigo to version 2.10 today, and I confirm the same message.
Try the check files integrity plugin, does it report anything?
Hm, seems to be related to GThumb+ here. Plain 2.10 with GThumb+ enabled breaks on category view.
EDIT: no, picture page is broken, too.
curl -sSL -o - https://github.com/Piwigo/Piwigo/pull/952.patch | patch -p1and things start working again