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

Unwanted PHP warning for failed unserialize #1090

Closed
ulrichmathes opened this issue Aug 6, 2024 · 5 comments
Closed

Unwanted PHP warning for failed unserialize #1090

ulrichmathes opened this issue Aug 6, 2024 · 5 comments

Comments

@ulrichmathes
Copy link

Bug Report

Current Behavior
JsonCompatibilityConverter:53 rises PHP warning

Expected behavior/output
When JsonCompatibilityConverter tries to unserialize a string and fails, there should be no warning.
There is a try catch block, but unserialize emits a warning instead of throwing an exception.

Steps to reproduce
I think JsonCompatibilityConverterTest will rise this warning but unitTests are configured as failOnWarning="false".

Environment

  • Crawler version(s): 12.0.4
  • TYPO3 version(s): 12.4
  • PHP version(s): 8.3
  • Is your TYPO3 installation set up with Composer (Composer Mode): yes

Possible Solution
suppress the warning via @unserialize instead of not applying try catch?

Additional context
This issue is caused by the change in PHP 8.3:

8.3.0 Now emits E_WARNING when the passed string is not unserializeable; previously E_NOTICE was emitted.

Copy link

github-actions bot commented Aug 6, 2024

Hi there, thank you for taking your time to create your first issue. Please give us a bit of time to review it.

@tomasnorre
Copy link
Owner

This looks like it could be related to #1087, do you agree?

@ulrichmathes
Copy link
Author

Same root but in my case both commands crawler:buildQueue and crawler:processQueue proceed running while generating a lot of warnings.

@ulrichmathes
Copy link
Author

But yes, we could close this issue as its not really relevant if the command is running but rising warnings or gets terminated after the first warning.

@tomasnorre
Copy link
Owner

I'll close this issue as @ulrichmathes suggested.

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

No branches or pull requests

2 participants