Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception when trying to add empty user email address
Closed, ResolvedPublic

Description

  1. PHP 8.2.5; Phorge at ac4c95169973e742ea768ebd103bb2142c3bdc7d
  2. Go to your own email address settings at http://phorge.localhost/settings/panel/email/
  3. Select Add New Address button
  4. In the New Address overlay dialog, enter nothing in the Email field.
  5. Select the Save button
[2023-05-09 20:51:06] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=renderDashboardTabPanelContent, ref.master=d47289622650, ref.renderDashboardTabPanelContent=d47289622650), phorge(head=verifyOwnNewEmailAd, ref.master=ac4c95169973, ref.verifyOwnNewEmailAd=ac4c95169973)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:189]
  #1 <#2> PhabricatorEmailAddressesSettingsPanel::returnNewAddressResponse(AphrontRequest, PhutilURI, string) called at [<phorge>/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:39]
  #2 <#2> PhabricatorEmailAddressesSettingsPanel::processRequest(AphrontRequest) called at [<phorge>/src/applications/settings/controller/PhabricatorSettingsMainController.php:107]
  #3 <#2> PhabricatorSettingsMainController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #4 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #5 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #6 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #7 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #8 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that exception; after performing steps 2-5 again on http://phorge.localhost/settings/panel/email/, correct error message "Email is required." is displayed.

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.