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

[BUGFIX] Catch E_WARNING when unserialize() fails #1117

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

cweiske
Copy link
Contributor

@cweiske cweiske commented Jan 14, 2025

Since PHP 8.3, unserialize() throws an E_WARNING instead of E_NOTICE. This leads to an error when viewing crawler information for pages and when crawling sites:

PHP Warning: unserialize(): Error at offset 0 of 122 bytes
in typo3conf/ext/crawler/Classes/Converter/JsonCompatibilityConverter.php line 39

This patch solves the problem in the most non-invasive way by simply catching the unserialize warning.

Resolves: #1087

Description

I have

  • Checked that CGL are followed
  • Checked that the Tests are still working
  • Added description to CHANGELOG.md (github-handle is optional)
  • Added tests for the new code

@tomasnorre
Copy link
Owner

Thanks for your PR. I'll review one of the next days.

Since PHP 8.3, unserialize() throws an E_WARNING instead of E_NOTICE.
This leads to an error when viewing crawler information for pages
and when crawling sites:

> PHP Warning: unserialize(): Error at offset 0 of 122 bytes
> in typo3conf/ext/crawler/Classes/Converter/JsonCompatibilityConverter.php line 39

Resolves: tomasnorre#1087
@cweiske cweiske force-pushed the unserialize-warning branch from 670dd21 to c993840 Compare January 15, 2025 14:06
@tomasnorre tomasnorre merged commit bc92a65 into tomasnorre:v11.x Jan 15, 2025
27 of 32 checks passed
@cweiske
Copy link
Contributor Author

cweiske commented Jan 29, 2025

Version 11.0.11 has the fix.

@cweiske cweiske deleted the unserialize-warning branch January 29, 2025 12:17
@tomasnorre
Copy link
Owner

Version 11.0.11 has the fix.

Thanks, think it simply forgot to update the issue.

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.

2 participants