Page MenuHomePhabricator

Fix error handler on PHP 8
ClosedPublic

Authored by jrtc27 on Jan 10 2021, 9:54 PM.
Tags
None
Referenced Files
F13062288: D21498.diff
Fri, Apr 19, 10:45 PM
Unknown Object (File)
Tue, Apr 9, 6:55 AM
Unknown Object (File)
Sat, Apr 6, 4:42 AM
Unknown Object (File)
Sat, Mar 30, 9:41 AM
Unknown Object (File)
Mar 1 2024, 11:06 AM
Unknown Object (File)
Feb 25 2024, 5:31 PM
Unknown Object (File)
Feb 15 2024, 8:48 PM
Unknown Object (File)
Feb 9 2024, 1:47 AM
Subscribers

Details

Summary

PHP 7.2.0 deprecated the 5th parameter and PHP 8 removed it, so stop
using it and provide a default value to avoid erroring with:

Too few arguments to function PhutilErrorHandler::handleError(), 4 passed and exactly 5 expected
Test Plan

Used to create this revision with PHP 8 on macOS

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Unknown Object (Owners Package).Jan 10 2021, 9:54 PM
epriestley removed a reviewer: Unknown Object (Owners Package).Jan 10 2021, 9:55 PM

It's possible that third party code which installs custom error listeners via setErrorListener() that expect 'context' to be populated may exist, I'm not aware of any such code and think it probably does not exist. It would also be easy to update any such code in response to this change, so I think it's not worth retaining backward compatibility with a dummy parameter and that this is the most-desirable version of this change.

This revision is now accepted and ready to land.Jan 10 2021, 10:17 PM

Trivially rebased for landing

This revision was automatically updated to reflect the committed changes.