Page MenuHomePhorge

PHP 8.1 "strlen(null)" exceptions block rendering the People page of a user
Closed, ResolvedPublic

Description

  1. PHP 8.1.8, with D25147 and D25153 locally applied on top to avoid exceptions already covered in those proposed changes
  2. Go to http://phorge.localhost
  3. In the top bar, select User dropdown (between Favorites dropdown and Search field)
  4. Select Profile in dropdown menu to go to http://phorge.localhost/p/username/ , or
  5. Select Manage in dropdown menu to go to http://phorge.localhost/people/manage/userid/
[2023-05-01 14:38:45] 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=D25167, ref.master=6e8852837004, ref.D25167=6e8852837004)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php:25]
  #1 <#2> PhabricatorPeopleBadgesProfileMenuItem::getDisplayName(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleBadgesProfileMenuItem.php:51]
  #2 <#2> PhabricatorPeopleBadgesProfileMenuItem::newMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/menuitem/PhabricatorProfileMenuItem.php:77]
  #3 <#2> PhabricatorProfileMenuItem::getMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:129]
  #4 <#2> PhabricatorProfileMenuItemConfiguration::getMenuItemViewList() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:1293]
  #5 <#2> PhabricatorProfileMenuEngine::newProfileMenuItemViewList() called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileController.php:123]
  #6 <#2> PhabricatorPeopleProfileController::newNavigation(PhabricatorUser, string) called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileViewController.php:69]
  #7 <#2> PhabricatorPeopleProfileViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that line, get next exception:

[2023-05-01 14:40:10] 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=D25167, ref.master=6e8852837004, ref.D25167=6e8852837004)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php:25]
  #1 <#2> PhabricatorPeopleTasksProfileMenuItem::getDisplayName(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleTasksProfileMenuItem.php:51]
  #2 <#2> PhabricatorPeopleTasksProfileMenuItem::newMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/menuitem/PhabricatorProfileMenuItem.php:77]
  #3 <#2> PhabricatorProfileMenuItem::getMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:129]
  #4 <#2> PhabricatorProfileMenuItemConfiguration::getMenuItemViewList() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:1293]
  #5 <#2> PhabricatorProfileMenuEngine::newProfileMenuItemViewList() called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileController.php:123]
  #6 <#2> PhabricatorPeopleProfileController::newNavigation(PhabricatorUser, string) called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileViewController.php:69]
  #7 <#2> PhabricatorPeopleProfileViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that line, get next exception:

[2023-05-01 14:41:27] 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=D25167, ref.master=6e8852837004, ref.D25167=6e8852837004)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleRevisionsProfileMenuItem.php:25]
  #1 <#2> PhabricatorPeopleRevisionsProfileMenuItem::getDisplayName(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleRevisionsProfileMenuItem.php:51]
  #2 <#2> PhabricatorPeopleRevisionsProfileMenuItem::newMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/menuitem/PhabricatorProfileMenuItem.php:77]
  #3 <#2> PhabricatorProfileMenuItem::getMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:129]
  #4 <#2> PhabricatorProfileMenuItemConfiguration::getMenuItemViewList() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:1293]
  #5 <#2> PhabricatorProfileMenuEngine::newProfileMenuItemViewList() called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileController.php:123]
  #6 <#2> PhabricatorPeopleProfileController::newNavigation(PhabricatorUser, string) called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileViewController.php:69]
  #7 <#2> PhabricatorPeopleProfileViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that line, get next exception:

[2023-05-01 14:42:35] 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=D25167, ref.master=6e8852837004, ref.D25167=6e8852837004)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php:25]
  #1 <#2> PhabricatorPeopleCommitsProfileMenuItem::getDisplayName(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleCommitsProfileMenuItem.php:51]
  #2 <#2> PhabricatorPeopleCommitsProfileMenuItem::newMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/menuitem/PhabricatorProfileMenuItem.php:77]
  #3 <#2> PhabricatorProfileMenuItem::getMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:129]
  #4 <#2> PhabricatorProfileMenuItemConfiguration::getMenuItemViewList() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:1293]
  #5 <#2> PhabricatorProfileMenuEngine::newProfileMenuItemViewList() called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileController.php:123]
  #6 <#2> PhabricatorPeopleProfileController::newNavigation(PhabricatorUser, string) called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileViewController.php:69]
  #7 <#2> PhabricatorPeopleProfileViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that line, get next exception:

[2023-05-01 14:43:35] 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=D25167, ref.master=6e8852837004, ref.D25167=6e8852837004)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php:25]
  #1 <#2> PhabricatorPeopleManageProfileMenuItem::getDisplayName(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/people/menuitem/PhabricatorPeopleManageProfileMenuItem.php:51]
  #2 <#2> PhabricatorPeopleManageProfileMenuItem::newMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/menuitem/PhabricatorProfileMenuItem.php:77]
  #3 <#2> PhabricatorProfileMenuItem::getMenuItemViewList(PhabricatorProfileMenuItemConfiguration) called at [<phorge>/src/applications/search/storage/PhabricatorProfileMenuItemConfiguration.php:129]
  #4 <#2> PhabricatorProfileMenuItemConfiguration::getMenuItemViewList() called at [<phorge>/src/applications/search/engine/PhabricatorProfileMenuEngine.php:1293]
  #5 <#2> PhabricatorProfileMenuEngine::newProfileMenuItemViewList() called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileController.php:123]
  #6 <#2> PhabricatorPeopleProfileController::newNavigation(PhabricatorUser, string) called at [<phorge>/src/applications/people/controller/PhabricatorPeopleProfileViewController.php:69]
  #7 <#2> PhabricatorPeopleProfileViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #8 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #9 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #10 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #11 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #12 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Finally, pages http://phorge.localhost/p/username/ and http://phorge.localhost/people/manage/userid/ get rendered in web browser.

Related Objects