Page MenuHomePhorge

Arc Patch fails with PHP 8.1 strlen(null) error
Closed, ResolvedPublic

Description

When using arc patch against a diff on a PHP 8.1 Phorge server, it fails with a strlen(null) error.

Stack Trace:

AH01071: Got error 'PHP message: [2023-07-29 10:51:45] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter
#1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]PHP message: arcanist(head=master, ref.master=8130241a11ac, custom=4), phorge(head=master, ref.master=7c1487e4dcfa)PHP message:
#0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:293]PHP message:
#1 <#2> PhabricatorConduitAPIController::authenticateUser(ConduitAPIRequest, array, string) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:50]PHP message:
#2 phlog(RuntimeException) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:111]PHP message:
#3 PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]PHP message:
#4 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]PHP message:
#5 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]'

After fixing this, we then get the following strlen(null) error:

AH01071: Got error 'PHP message: [2023-07-29 10:51:45] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter
#1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]PHP message: arcanist(head=master, ref.master=8130241a11ac, custom=4), phorge(head=master, ref.master=7c1487e4dcfa)PHP message:
#0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/differential/conduit/DifferentialGetCommitMessageConduitAPIMethod.php:59]PHP message:
#1 <#2> DifferentialGetCommitMessageConduitAPIMethod::execute(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/method/ConduitAPIMethod.php:156]PHP message:
#2 <#2> ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/call/ConduitCall.php:131]PHP message:
#3 <#2> ConduitCall::executeMethod() called at [<phorge>/src/applications/conduit/call/ConduitCall.php:81]PHP message:
#4 <#2> ConduitCall::execute() called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:83]PHP message:
#5 phlog(RuntimeException) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:111]PHP message:
#6 PhabricatorConduitAPIController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]PHP message:
#7 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]PHP message:
#8 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]'

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusAssignedTask
OpenNone
ResolvedSten