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] Reliably catch E_WARNING when unserialize() fails #1124

Closed
wants to merge 1 commit into from

Conversation

marvinschroeder
Copy link

Description

This PR should reliably catch the E_WARNING by unserialize().
As mentioned in the official RFC of the unserialize() change in PHP 8.3, this should be the preferred way of catching this error.

Should resolve #1087.

Sorry to not have checked all the points below, since all mentioned steps in the CONTRIBUTING.md not worked on my local machine.

Tested this code on a project with Typo3 v11.5.41 and PHP 8.3.13.

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 you PR. Could you have a look @cweiske? Would appreciate that.

@cweiske
Copy link
Contributor

cweiske commented Feb 4, 2025

I've found out why my previous patch works for me: #1087 (comment)

The conclusion is that if $GLOBALS['TYPO3_CONF_VARS']['SYS']['exceptionalErrors'] includes E_WARNING, then this patch here is not necessary.

Since this is an easy workaround/solution, I'd not merge this patch here.

@tomasnorre
Copy link
Owner

Thanks for looking into it @cweiske. I'll close this 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.

3 participants