- Saved searches
- Use saved searches to filter your results more quickly
- strpos deprecated warning #884
- strpos deprecated warning #884
- Comments
- Deprecated: strpos(): Non-string needles will be interpreted as strings in the future
- Solution 3
- Related videos on Youtube
- Tristan
- Comments
- Saved searches
- Use saved searches to filter your results more quickly
- Front-end errors - strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior #1495
- Front-end errors - strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior #1495
- Comments
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strpos deprecated warning #884
strpos deprecated warning #884
Comments
I am getting this warning in my PHP (v7.3.1) log file:
[12-Jul-2019 11:05:10 America/Chicago] PHP Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /Users/Shared/admidio-4_0-beta/adm_program/system/bootstrap/constants.php on line 75 [12-Jul-2019 11:05:10 America/Chicago] PHP Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /Users/Shared/admidio-4_0-beta/adm_program/system/bootstrap/constants.php on line 76
The text was updated successfully, but these errors were encountered:
Deprecated: strpos(): Non-string needles will be interpreted as strings in the future
All you have to do is pass in a string as the parameter for strpos .
strpos('_', strval($this->Category->getPath()))
Or, ensure the Category->getPath() returns a string and not a mixed type.
Solution 3
if (strpos($class, $suffix) === FALSE) replace with if ($suffix && strpos($class, $suffix) === FALSE)
Related videos on Youtube
Tristan
Comments
Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
if ($this->Category->getPath() && strpos('_', $this->Category->getPath()))
It seems it come from this code : strpos('_', $this->Category->getPath() $this->Category->getPath() can return this value for example :
The error message is clear, the second parameter for strpos must be a string. Your method can return integers. That is no longer allowed. Solution: cast the result to a string.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strpos() is deprecated in php 7.3 #988
strpos() is deprecated in php 7.3 #988
Comments
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 :
The text was updated successfully, but these errors were encountered:
…ster will get a new version of jshrink)
For now, I only fixed the compatibility with PHP 7.3 based on tedious/JShrink@9110581
@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.
* 2.9: cherry-pick 1 commit from translation fixes Piwigo#988 no more warning on PHP 7.3 (only for branch 2.9, branch master will get a new version of jshrink) next release is 2.9.5 cherry-pick 16 commits from translation (cp dc40d19) fixes Piwigo#945 pwg_log automatically creates a new history.section in the enum, when needed (cp 16abd1a) solves issue 945, if plugin developers add their own sections, Piwigo tries to put them into history table. Since the section column is an enum, php issued a warning. (cp ab46632) Revert "Include pwg_token in user list POST request (Fixes Piwigo#748) (Piwigo#866)" (cp 1646f5e) fixes Piwigo#998 temporary fix for Piwigo Remote Sync compatibility (cp b29ab34) fixes Piwigo#972 use an alternative algorithm to discover number of future orphans, with very large albums
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.
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.
Deprecated: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /var/www/vhosts/xxxxxx.cz/httpdocs/piwigo/include/jshrink.class.php on line 195
;
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.
Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Front-end errors - strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior #1495
Front-end errors - strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior #1495
Comments
Errors produced on the front-end (visible only to Super Admins):
Deprecated
strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
ee/legacy/libraries/channel_entries_parser/Parser.php, line 297Severity: E_DEPRECATED
Deprecated
strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
ee/legacy/libraries/channel_entries_parser/Parser.php, line 297Severity: E_DEPRECATED
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/ExpressionEngine/Boot/boot.common.php, line 477Severity: E_WARNING
I've been seeing these errors for a while. Bumping up to latest EE version and PHP 7.4 didn't make a difference, unfortunately.
EE version 6.1.5
PHP version 7.4.23
MySQL version 5.7.36
- Obscure 2.1 (https://github.com/mcfarlandonline/obscure)
- Statistics 2.2.0
- Query 2.0.0
- Word Limiter 2.1.0
- Snaptcha 3.1.1
The text was updated successfully, but these errors were encountered: