-
-
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
Fixed null parameter warning in Mage_Wishlist_Controller_Abstract::allcartAction() #4083
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am getting this error with PHP 8.3 in the system.log file: ```Deprecated functionality: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/app/code/core/Mage/Wishlist/Controller/Abstract.php on line 88``` **/app/code/core/Mage/Wishlist/Controller/Abstract.php on line 88** In order to reproduce this issue log into a customer account in the Frontend then add any product to the Wishlist. You will be redirected to the customer account. A part of the URL is **wishlist/index/index/wishlist_id/[PRODUCT_ID]/**. Press the [Add All to the Cart] button. In my case I am getting an error message because the product has custom options and I have to choose them. If you take a look into the /var/log directory you will see a nice system.log file, having 374 kB as size and inside the same line 1745 times. IMPORTANT NOTE: This PR has 3 implementations inside (3 lines, 2 commented), there may be others. Please share your opinions, at the end there will be only one line left.
kiatng
reviewed
Jul 6, 2024
fballiano
reviewed
Jul 6, 2024
kiatng
approved these changes
Jul 7, 2024
kiatng
reviewed
Jul 7, 2024
fballiano
approved these changes
Jul 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested, works perfectly
fballiano
changed the title
Deprecated functionality: strlen(): Passing null to parameter #1
Fixed null parameter warning in Mage_Wishlist_Controller_Abstract::allcartAction()
Jul 7, 2024
On phpstan level 5 ...
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is related to the issue #4076.
I am getting this error with PHP > 8.1 in the system.log file:
Deprecated functionality: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/html/app/code/core/Mage/Wishlist/Controller/Abstract.php on line 88
/app/code/core/Mage/Wishlist/Controller/Abstract.php on line 88
In order to reproduce this issue log into a customer account in the Frontend then add any product to the Wishlist. You will be redirected to the customer account. A part of the URL is wishlist/index/index/wishlist_id/[PRODUCT_ID]/. Press the [Add All to the Cart] button. In my case I am getting an error message because the product has custom options and I have to choose them. If you take a look into the /var/log directory you will see a nice system.log file, having 374 kB as size and inside the same line 1745 times. Every line is for a product which is not in the wishlist. With a script someone could make the system.log file as big as he wants, an pretty fast.
IMPORTANT NOTE
This PR has 4 implementations inside (4 lines - 1 my choice, 3 commented), there may be others. Please share your opinions, at the end there will be only one line left. Once it is merged I will fix the same issue in the Import/Export module.