Problem/Motivation

The context parameter of error handlers has been deprecated in PHP 7.2 and relying on it is discouraged - see https://www.php.net/manual/en/function.set-error-handler.php

Proposed resolution

Remove context argument from custom error handers in tests

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

CommentFileSizeAuthor
#6 3173888-6.patch4.15 KBandypost
#6 interdiff.txt1.67 KBandypost
#2 3173888-2.patch2.48 KBalexpott

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new2.48 KB
andypost’s picture

Issue tags: +PHP 7.2

Status: Needs review » Needs work

The last submitted patch, 2: 3173888-2.patch, failed testing. View results

andypost’s picture

requeued, unrelated failure QuickEditIntegrationTest

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new1.67 KB
new4.15 KB

Not sure about deprecation process here but both _drupal_error_handler() and _drupal_error_handler_real() using this argument but does not consume it (unused variable)

alexpott’s picture

Yep changing that makes sense. I wonder why it's not causing deprecations - but no matter. The change is fine I think.

gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +PHP 8.0

We are not using $context for anything and not passing it into an extension point (eg. custom error handler), so this does not change our API. Looks good.

  • catch committed e9969b0 on 9.1.x
    Issue #3173888 by andypost, alexpott, Gábor Hojtsy: Error handler...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed e9969b0 and pushed to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.