Navigation Menu

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

Prevent memory error when using PHP8 and a session error happens #16943

Merged
merged 1 commit into from Dec 13, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Dec 13, 2020

Description:

Noticed it exceeded 512MB, then 2GB, ...

It was running in an endless loop because

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Zend_Session_Exception::handleSessionStartError(), 4 passed and exactly 5 expected i

See https://www.php.net/manual/en/function.set-error-handler.php

Since PHP 8: errcontext was removed, and will no longer be passed to user callbacks.

There might be also other places where we maybe use error handler

Review

  • Functional review done
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

Noticed it exceeded 512MB, then 2GB, ...

It was running in an endless loop because 

> PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Zend_Session_Exception::handleSessionStartError(), 4 passed and exactly 5 expected i

See https://www.php.net/manual/en/function.set-error-handler.php

> Since PHP 8: errcontext was removed, and will no longer be passed to user callbacks.

There might be also other places where we maybe use error handler
@tsteur tsteur added the Needs Review PRs that need a code review label Dec 13, 2020
@tsteur tsteur added this to the 4.0.x milestone Dec 13, 2020
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already had a similar fix in #16897. can confirm that works

@tsteur tsteur merged commit 5b48e4f into 4.x-dev Dec 13, 2020
@sgiehl sgiehl deleted the errorhandler4args branch December 15, 2020 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants