Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception trying to create an empty Menu Item
Closed, ResolvedPublic

Description

  1. PHP 8.2.6; Phorge at 2df7ea13a3877250354556f08f40e26ccc727144
  2. Select the Favorites item in the top bar
  3. Select Edit Favorites in upper right corner to go to http://phorge.localhost/favorites/menu/configure/custom/
  4. In the Add New Menu Item... sidebar, select Conpherence or Project
  5. On http://phorge.localhost/favorites/menu/new/custom/conpherence/ or on http://phorge.localhost/favorites/menu/new/custom/project/ , do not enter anything and select Create Menu Item
[2023-05-14 10:09:02] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=conduitArrayFuse, ref.master=c14785c3795c, ref.conduitArrayFuse=81b4031f19f7), phorge(head=favMenuItem, ref.master=2df7ea13a387, ref.favMenuItem=2df7ea13a387)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/search/menuitem/PhabricatorProfileMenuItem.php:129]
  #1 <#2> PhabricatorProfileMenuItem::isEmptyTransaction(NULL, array) called at [<phorge>/src/applications/search/menuitem/PhabricatorApplicationProfileMenuItem.php:112]
  #2 <#2> PhabricatorApplicationProfileMenuItem::validateTransactions(PhabricatorProfileMenuItemConfiguration, string, NULL, array) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:143]
  #3 <#2> PhabricatorProfileMenuItemConfiguration::validateTransactions(array) called at [<phorge>/src/applications/search/editor/PhabricatorProfileMenuEditor.php:115]
  #4 <#2> PhabricatorProfileMenuEditor::validateTransaction(PhabricatorProfileMenuItemConfiguration, string, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1234]
  #5 <#2> PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorProfileMenuItemConfiguration, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #6 <#2> PhabricatorEditEngine::buildEditResponse(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #7 <#2> PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:935]
  #8 <#2> PhabricatorProfileMenuEngine::buildItemNewContent(string, string) called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:266]
  #9 <#2> PhabricatorProfileMenuEngine::buildResponse() called at [<phorge>/src/applications/favorites/controller/PhabricatorFavoritesMenuItemController.php:21]
  #10 <#2> PhabricatorFavoritesMenuItemController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #11 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #12 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #13 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #14 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #15 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that exception; afterwards Edit Menu Item overlay dialog correctly shows "You must choose a project" resp. "You must choose a room." error message without an exception.

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.