Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception when DarkConsole is enabled
Closed, ResolvedPublic

Description

  1. PHP 8.2.5; Phorge at 8eaa7c1ccf3d75d438e83e074a28ea7de1f15d37 with D25165 locally applied on top
  2. Set http://phorge.localhost/config/edit/darkconsole.enabled/ to true; set http://phorge.localhost/config/edit/darkconsole.always-on/ to true; set "Enable DarkConsole" on http://phorge.localhost/settings/user/testadmin/page/developer/ to true
  3. Go to http://phorge.localhost
  4. DarkConsole renders on top but stacktrace is printed in PHP error log (not visible in web UI):
[2023-05-04 15:23:28] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=d47289622650), phorge(head=darkConsoleDead, ref.master=8eaa7c1ccf3d, ref.darkConsoleDead=8eaa7c1ccf3d)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/console/controller/DarkConsoleController.php:29]
  #1 <#2> DarkConsoleController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #2 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorAjaxRequestExceptionHandler.php:27]
  #3 PhabricatorAjaxRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #4 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #6 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Stacktrace not printed anymore in error log after fixing that line.

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.