Page MenuHomePhorge

Fix Phorge PhabricatorFactDaemon::run() in PHP 8.2: Passing null to parameter #1 ($string) of type string is deprecated
Closed, ResolvedPublic

Description

If you use Phorge in PHP 8.2, the following crash happens in the daemon:

[31-Mar-2023 14:16:09 UTC] [2023-03-31 14:16:09] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
[31-Mar-2023 14:16:09 UTC] arcanist(head=master, ref.master=08dfffd5caf7), phorge(head=arcpatch-D25097_1, ref.master=fc9bbb9949f8, ref.arcpatch-D25097_1=d2e207e8e7ae)
[31-Mar-2023 14:16:09 UTC]   #0 PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/project/phid/PhabricatorProjectProjectPHIDType.php:46]
[31-Mar-2023 14:16:09 UTC]   #1 PhabricatorProjectProjectPHIDType::loadHandles(PhabricatorHandleQuery, array, array) called at [<phorge>/src/applications/phid/query/PhabricatorHandleQuery.php:78]
[31-Mar-2023 14:16:09 UTC]   #2 PhabricatorHandleQuery::loadPage() called at [<phorge>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:251]
[31-Mar-2023 14:16:09 UTC]   #3 PhabricatorPolicyAwareQuery::execute() called at [<phorge>/src/applications/phid/handle/pool/PhabricatorHandlePool.php:73]
[31-Mar-2023 14:16:09 UTC]   #4 PhabricatorHandlePool::loadPHIDs(array) called at [<phorge>/src/applications/phid/handle/pool/PhabricatorHandleList.php:44]
[31-Mar-2023 14:16:09 UTC]   #5 PhabricatorHandleList::loadHandles() called at [<phorge>/src/applications/phid/handle/pool/PhabricatorHandleList.php:49]
[31-Mar-2023 14:16:09 UTC]   #6 PhabricatorHandleList::getHandle(string) called at [<phorge>/src/applications/phid/handle/pool/PhabricatorHandleList.php:136]
[31-Mar-2023 14:16:09 UTC]   #7 PhabricatorHandleList::current()
[31-Mar-2023 14:16:09 UTC]   #8 iterator_to_array(PhabricatorHandleList) called at [<phorge>/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php:175]

This is related to:

T15190: PHP 8.1: strlen() and other scalar-only functions do not accept NULL anymore - understand fix strategies

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.