Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception blocks rendering project's Configure Menu page
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. PHP 8.1.8
  2. Create a project
  3. Go to http://phorge.localhost/project/manage/1/
  4. Select Edit Menu in the sidebar on the right to go to http://phorge.localhost/project/1/item/configure/

Actual outcome:

  1. Get exception already covered in T15317/D25166.
  2. After that exception, get another exception:
[2023-05-01 22:38:51] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=T15263, ref.master=82d1abd4edd1, ref.T15263=4324d11c8b49), phorge(head=undefImageCreateFromString, ref.master=8f669ea08289, ref.undefImageCreateFromString=8f669ea08289)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/project/menuitem/PhabricatorProjectDetailsProfileMenuItem.php:34]
  #1 <#2> PhabricatorProjectDetailsProfileMenuItem::getDisplayName(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:109]
  #2 <#2> PhabricatorProfileMenuItemConfiguration::getDisplayName() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:731]
  #3 <#2> PhabricatorProfileMenuEngine::buildItemConfigureContent(array) called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:255]
  #4 <#2> PhabricatorProfileMenuEngine::buildResponse() called at [<phorge>/src/applications/project/controller/PhabricatorProjectMenuItemController.php:21]
  #5 <#2> PhabricatorProjectMenuItemController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #6 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #7 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #8 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #9 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #10 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

After fixing that line, Menu Items on http://phorge.localhost/project/1/item/configure/global/ get displayed in web browser.

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.