-
-
Notifications
You must be signed in to change notification settings - Fork 436
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.1] Fix passing null to non-nullable internal function params #2586
Conversation
LGTM |
Today is a great day! |
31f591b
to
53b7955
Compare
@sreichel why hold? |
@colinmollenhour stop stop stop :) This PR was already closed b/c it was split into smaller PRs. There are some lines I'd like to check .... eg |
Oops, my bad.. :) Just trying to get this merged sooner than later since it seems as people run into these issues one by one there will be many more PRs. |
edit: we dont need no PR for every change. We can merge whats left over at the end. |
app/code/core/Mage/SalesRule/Model/Resource/Rule/Collection.php
Outdated
Show resolved
Hide resolved
Can be done later. Think its ready. |
it also seems fine to me |
Finally! this PR has went through so much 😆 |
I'll just wait for the workflows to finish then merge to both branches, thanks guys |
cherry picked to v20 cause no conflicts |
* Updated calls to strlen(), ref OpenMage#2586 * Update/fix
Description (*)
This PR fixes lots of "Passing null to non-nullable internal function parameters" deprecation notices introduced in PHP 8.1, which I came across when navigating or performing different actions on the frontend and admin.
The commits are grouped by function for easier review, and the fixes favor casting when appropriate, and PHPdocs to determine where to do the change. For example:
Mage_Core_Helper_Data::escapeHtml
PHPdoc says it accepts a non-nullable string, so instead of casting the parameter to a string inside the method, I cast the arguments in the usages instead.Deprecation errors in
lib/Zend
were skipped in the hope we'll switch to zf1-future soon (?).Related Pull Requests
Manual testing scenarios (*)
error_reporting
directive in yourphp.ini
includes deprecation errors, then comment out the lines below:magento-lts/app/code/core/Mage/Core/functions.php
Lines 125 to 128 in 97e0b70
Questions or comments
Please make sure to review thoroughly before approving.
Contribution checklist (*)