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

Fix some PHP 8.1 deprecation warnings #60

Conversation

jcvincenti
Copy link

@jcvincenti jcvincenti commented Jan 9, 2024

  • Fix passing null to str_replace and preg_replace in HttpSocket
  • Fix dynamic props usage in ModelValidator

Fixes the following deprecation warnings:
preg_replace(): Passing null to parameter #2 ($replacement) of type array|string is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/Network/Http/HttpSocket.php, line 723]

str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/Network/Http/HttpSocket.php, line 735]

str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/Network/Http/HttpSocket.php, line 741]

str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/Network/Http/HttpSocket.php, line 744]

Creation of dynamic property ModelValidator::$validationErrors is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/Model/ModelValidator.php, line 397]

rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated [APP/Vendor/cakephp/cakephp/lib/Cake/Routing/Route/CakeRoute.php, line 501]

* Fix passing null to str_replace and preg_replace in HttpSocket
* Fix dynamic props usage in ModelValidator
* Fix passing null to rawurlencode in CakeRoute
@jcvincenti jcvincenti force-pushed the fix-null-preg-and-str-replace-and-dynamic-props-on-model-validator branch from 6242534 to 2362fa2 Compare January 10, 2024 18:03
@kamilwylegala
Copy link
Owner

Thank you for your contribution. I will merge it in the evening (CET).

@kamilwylegala kamilwylegala merged commit 84cfdfb into kamilwylegala:master Jan 11, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants