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

Fixed null deprecation in UnserializeArray.php #4394

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

kiatng
Copy link
Contributor

@kiatng kiatng commented Nov 28, 2024

Description (*)

See issue #4352

Fixed Issues (if relevant)

  1. Fixes Null deprecation in UnserializeArray.php #4352

@github-actions github-actions bot added the Component: Core Relates to Mage_Core label Nov 28, 2024
@sreichel
Copy link
Contributor

The exeption should already be thown inside try-catch. (?)

@sreichel
Copy link
Contributor

Please approve #4389 before. I'm sure the test result will change.

@kiatng
Copy link
Contributor Author

kiatng commented Nov 30, 2024

The exeption should already be thown inside try-catch. (?)

Yes, I thought the same, but catch (Error $e) doesn't catch E_DEPRECATED, may be in PHP9, it will. You can verify it in https://onlinephp.io/c/8857c5. Your suggested '@' suppresses these errors.

@sreichel
Copy link
Contributor

I did not test. To avoid suppress-operator this should work, too. (???)

#4352 (comment)

@kiatng
Copy link
Contributor Author

kiatng commented Dec 2, 2024

I did not test. To avoid suppress-operator this should work, too. (???)

#4352 (comment)

No, it does not catch other types of errors, such as empty string.

@sreichel sreichel added this to the 20.13.0 milestone Jan 1, 2025
@sreichel sreichel changed the title Fixed issue #4352 null deprecation in UnserializeArray.php Fixed null deprecation in UnserializeArray.php Jan 6, 2025
@sreichel
Copy link
Contributor

sreichel commented Jan 6, 2025

I think its enough to fix the message in unit test.

@sreichel sreichel added bug and removed bug labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Core Relates to Mage_Core phpunit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null deprecation in UnserializeArray.php
2 participants