Exceptions when viewing diffs

After updating to latest stable today, I am getting he following message pop up for some diffs in both Differental and Diffusion:

Unhandled Exception (“RuntimeException”)
Trying to access array offset on value of type null

This is probably an older issue that has been uncovered by the recent change

  • All PHP language-level errors are now raised as exceptions by default.

The stack trace shows the problem is coming from DifferentialHunkParser:

EXCEPTION: (RuntimeException) Trying to access array offset on value of type null at [<arcanist>/src/error/PhutilErrorHandler.php:263]
arcanist(head=stable, ref.master=989690868513, ref.stable=acf38083f7ff), phabricator(head=stable, ref.stable=4c2da0260be2, custom=4)
   #0 <#2> PhutilErrorHandler::handleError called at [<phabricator>/src/applications/differential/parser/DifferentialHunkParser.php:459]
   #1 <#2> DifferentialHunkParser::getCorpus called at [<phabricator>/src/applications/differential/parser/DifferentialHunkParser.php:452]
   #2 <#2> DifferentialHunkParser::getNewCorpus called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:674]
   #3 <#2> DifferentialChangesetParser::process called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:622]
   #4 <#2> DifferentialChangesetParser::tryCacheStuff called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:788]
   #5 <#2> DifferentialChangesetParser::render called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:75]
   #6 <#2> DifferentialChangesetParser::renderChangeset called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:1874]
   #7 <#2> DifferentialChangesetParser::newChangesetResponse called at [<phabricator>/src/applications/differential/controller/DifferentialChangesetViewController.php:279]
   #8 <#2> DifferentialChangesetViewController::handleRequest called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:288]
   #9 phlog called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
   #10 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:752]
   #11 AphrontApplicationConfiguration::handleThrowable called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:300]
   #12 AphrontApplicationConfiguration::processRequest called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:208]
   #13 AphrontApplicationConfiguration::runHTTPRequest called at [<phabricator>/webroot/index.php:35]

Reproduction Instructions
I can’t find what is special about these diffs. New diffs I have created do not trigger the exception, nor do most of the old diffs. But some existing diffs do, both in Differential and Diffusion.

Phabricator/Arcanist Version

phabricator 4c2da0260be2 Sat, Apr 25 d05d8f655896
arcanist acf38083f7ff Sat, Apr 25 68f050bd14e0

Thanks! This should be fixed by https://secure.phabricator.com/D21169, which is now in master and stable.

(I think your suspicion about the cause was right: this looks like an interaction between PHP 7.4 issuing a notice for null['idx'] combined with more severe error handling in Phabricator.)