Skip to content
New issue

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

PHP 8.2 Deprecation and other notices #1664

Closed
adrianbj opened this issue Jan 12, 2023 · 16 comments
Closed

PHP 8.2 Deprecation and other notices #1664

adrianbj opened this issue Jan 12, 2023 · 16 comments

Comments

@adrianbj
Copy link

Short description of the issue

Can we build up a list here like we've done before?

PHP Deprecated: Creation of dynamic property HTMLPurifier_Lexer_DOMLex::$_entity_parser is deprecated in [.../MarkupHTMLPurifier/htmlpurifier/HTMLPurifier.standalone.php:7794]

@ryancramerdesign
Copy link
Member

Thanks @adrianbj I've upgraded the htmlpurifier version which should fix this issue.

@adrianbj
Copy link
Author

Looks good now - thanks @ryancramerdesign - do you want to keep this open for other 8.2 issues like we have in the past or would you prefer separate ones?

@tiefenb
Copy link

tiefenb commented Jan 18, 2023

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/site/modules/FieldtypeTable/FieldtypeTable.module on line 1676

@tiefenb
Copy link

tiefenb commented Jan 18, 2023

Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/site/modules/FieldtypeCombo/ComboSchema.php on line 224

@matjazpotocnik
Copy link
Collaborator

@tiefenb, based on the paths, I'm assuming those deprecations are related to the non-core modules? If so, it would be best to report them in the appropriate place (Pro Board?).

@JavonX
Copy link

JavonX commented Apr 24, 2023

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/httpdocs/wire/core/WireInput.php on line 371

Warning: Undefined array key 1 in /var/www/vhosts/httpdocs/site/modules/LoginPersist/LoginPersist.module on line 471

Warning: Undefined array key 2 in /var/www/vhosts/httpdocs/site/modules/LoginPersist/LoginPersist.module on line 471

Deprecated: setcookie(): Passing null to parameter #1 ($name) of type string is deprecated in /var/www/vhosts/httpdocs/site/modules/LoginPersist/LoginPersist.module on line 133

I get these messages. The first one is the only one related to the core. I posted all of them in case it has something to do with the loginPersit messages

@ryancramerdesign
Copy link
Member

@JavonX Just checked and that first one is already fixed on the dev branch. For the others, it looks like that LoginPersist module would need to be adjusted, here's a link to the author's issue page for that module: https://github.com/craigrodway/LoginPersist/issues

@gmclelland
Copy link

Here's a interesting project that might help with these types of PHP upgrades? https://github.com/rectorphp/rector

@designconcepts
Copy link

designconcepts commented Jun 5, 2023

This warning in 3.0.219 after deleting compiled module files:

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /path/to/site/wire/core/ModulePlaceholder.php on line 68

@adrianbj
Copy link
Author

adrianbj commented Jun 6, 2023

@ryancramerdesign - the deprecation that @designconcepts mentioned is breaking Tracy's Console panel for me because of the TracyDebugger::getApiData() call trying to populate all the PW methods etc into its autocomplete list.

ryancramerdesign added a commit to processwire/processwire that referenced this issue Jun 6, 2023
@ryancramerdesign
Copy link
Member

Thanks @designconcepts @adrianbj I've pushed a fix

@Toutouwai
Copy link

Toutouwai commented Jul 13, 2023

Some more from HTML Purifier in PW 3.0.222...
Sorry, false alarm, had an older version of MarkupHTMLPurifier in /site/modules/

@Toutouwai
Copy link

I saw this in Page Edit when a ProFields Table field has a CKEditor column:
PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in ...\Inputfield\InputfieldCKEditor\InputfieldCKEditor.module:725

@Toutouwai
Copy link

PHP Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in ...\1testing\wire\modules\Inputfield\InputfieldSelect.module:917

Seen in PW 2.0.223 when editing a ProFields Table field.

@ryancramerdesign
Copy link
Member

Thanks @Toutouwai I've pushed fixes for those.

ryancramerdesign added a commit to processwire/processwire that referenced this issue Aug 4, 2023
@esszett
Copy link

esszett commented Aug 6, 2023

Deprecated trim(): Passing null to parameter #1 ($string) of type string is deprecated in … wire/modules/PagePathHistory.module on line 172

fix: $path = $sanitizer->pagePathName('/' . trim((string)$path, '/'), Sanitizer::toAscii);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants