Open tiefenb opened 2 years ago
Looks like this is already fixed in https://github.com/processwire/processwire/commit/b170dfec16b4290f7d77d2f3fe55b67960864caf
PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /wire/modules/Fieldtype/FieldtypeSelector.module:55
Thanks @matjazpotocnik I've pushed a fix for that
PHP Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in [...\Process\ProcessPageLister\ProcessPageLister.module:1219]
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in [C:\inetpub\wwwroot\wire\core\InputfieldWrapper.php:869]
Thanks @matjazpotocnik I've pushed fixes for those two.
PHP Notice: Trying to get property 'value' of non-object in /wire/modules/Fieldtype/FieldtypePage.module:1338 PHP Notice: Array to string conversion in .../wire/modules/Fieldtype/FieldtypePage.module:1340
These occur when you have a "Selector" field and one of the rows in the selector has been set to a "Multiple pages" configured Page Reference field, eg:
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/wire/modules/Inputfield/InputfieldPassword/InputfieldPassword.module:338
@ryancramerdesign - just following up with more info on the Lister related issue two posts above this.
If I do if(is_array($value->value)) bd($value->value, $field->name);
on line 1339 of FieldtypePage.module, I get the following which correlate to the values of Media and Politician.
Thanks @adrianbj I've pushed updates for these
Thanks @ryancramerdesign - I just realized that Lister issue wasn't actually a PHP8 deprecation - sorry for posting in the wrong place, but thank you for fixing - looks good now!
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in
/var/www/html/wire/modules/Inputfield/InputfieldText/InputfieldText.module on line 164
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ...\wire\modules\Inputfield\InputfieldMarkup.module:107
PHP Deprecated: Automatic conversion of false to array is deprecated in [...\wire\modules\Process\ProcessLogger\ProcessLogger.module:379
Hey @ryancramerdesign
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in wire/core/PagesRaw.php&line=840
@ryancramerdesign
PHP Warning: Undefined array key "args" in [/wire/core/Debug.php:379]
@ryancramerdesign
PHP Warning: Undefined array key "args" in [/wire/core/Debug.php:379]
Same for me: PHP 8.2.6 ProcessWire 3.0.229 © 2024
DEPRECATED: URLENCODE(): PASSING NULL TO PARAMETER #1 ($STRING) OF TYPE STRING IS DEPRECATED IN /.../WIRE/MODULES/MARKUP/MARKUPPAGERNAV/MARKUPPAGERNAV.MODULE ON LINE 553
PW: 3.0.229 PHP: 8.1.20
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ...\wwwroot\wire\modules\Process\ProcessPageClone.module:279
@ryancramerdesign
Deprecated: number_format(): Passing null to parameter #1 ($num) of type float is deprecated in FieldtypeFloat.module:128
@ryancramerdesign - I am still seeing that Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in wire/core/Selectors.php on line 1484 that was reported in the OP of this issue.
Thanks @adrianbj @matjazpotocnik @lparikka @vieregg-jfc @Toutouwai @the-ge I've pushed updates to correct all of these.
I am still seeing that Deprecated: strpos(): Passing null to parameter https://github.com/processwire/processwire-issues/issues/1 ($haystack) of type string is deprecated in wire/core/Selectors.php on line 1484 that was reported in the OP of this issue.
@adrianbj This one I can't seem to identify. Here's the method that it is in below. The first line in the method should exclude the possibility of a null value for $type, since isset() will return false for null. Your line number didn't match with the strpos() line on mine (it was off by 2) so I'm wondering if you have an older version of the file?
static public function getOperatorType($operator, $is = false) {
if(!isset(self::$selectorTypes[$operator])) return false;
$type = self::$selectorTypes[$operator];
// now double check that we can map it back, in case PHP filters anything in the isset()
$op = array_search($type, self::$selectorTypes);
if($op === $operator) {
if($is) return true;
// Convert types like "SelectorEquals" to "Equals"
if(strpos($type, 'Selector') === 0) list(,$type) = explode('Selector', $type, 2);
return $type;
}
return false;
}
Hi @ryancramerdesign - so sorry to waste your time on that strpos issue. I am running the latest PW dev version on the site, but there was an old dev version of the site on the same server (with an older version of PW) sending errors to the same log file.
@adrianbj No problem, glad the mystery is solved. :)
@ryancramerdesign, you forgot to fix the issue mentioned by trk https://github.com/processwire/processwire-issues/issues/1467#issuecomment-1750400195
InputfieldPageTabe.module, line 521 (it was line 504 when trk reported it)
$value = $this->wire()->sanitizer->entities(strip_tags($value));
strip_tags(): Passing null to parameter https://github.com/processwire/processwire-issues/issues/1 ($string) of type string is deprecated
@ryancramerdesign
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/xxx/wire/modules/Textformatter/TextformatterEntities.module on line 29
PHP 8.3.12 Processwire 3.0.241
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in .../wire/core/WireTextTools.php:922
PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in FieldtypeComments.module:303
I have tested Processwire with the upcoming 8.1.0 Version of PHP and got some deprication warnings and errors: