Page MenuHomePhorge

PHP 8.1 "ltrim(null)" exception blocks adding additional 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 example@example.com in the Email field
  5. Select the Save button
  6. Get a Verification Email Sent overlay dialog
  7. Select the Done button
  8. Verification Email Sent dialog does not close. Check the logs:
[2023-05-09 20:43:48] EXCEPTION: (RuntimeException) trim(): 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=master, ref.master=ac4c95169973)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #1 <#2> trim(NULL) called at [<phorge>/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:175]
  #2 <#2> PhabricatorEmailAddressesSettingsPanel::returnNewAddressResponse(AphrontRequest, PhutilURI, string) called at [<phorge>/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:39]
  #3 <#2> PhabricatorEmailAddressesSettingsPanel::processRequest(AphrontRequest) called at [<phorge>/src/applications/settings/controller/PhabricatorSettingsMainController.php:107]
  #4 <#2> PhabricatorSettingsMainController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #5 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #6 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #7 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #8 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #9 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
[2023-05-09 20:43:48] EXCEPTION: (PhutilAggregateException) Encountered a processing exception, then another exception when trying to build a response for the first exception.
    - RuntimeException: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated
    - RuntimeException: trim(): Passing null to parameter #1 ($string) of type string is deprecated at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:316]
arcanist(head=renderDashboardTabPanelContent, ref.master=d47289622650, ref.renderDashboardTabPanelContent=d47289622650), phorge(head=master, ref.master=ac4c95169973)
  #0 <#4> trim(NULL) called at [<phorge>/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:175]
  #1 <#4> PhabricatorEmailAddressesSettingsPanel::returnNewAddressResponse(AphrontRequest, PhutilURI, string) called at [<phorge>/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php:39]
  #2 <#4> PhabricatorEmailAddressesSettingsPanel::processRequest(AphrontRequest) called at [<phorge>/src/applications/settings/controller/PhabricatorSettingsMainController.php:107]
  #3 <#4> PhabricatorSettingsMainController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #4 <#3> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #5 <#3> file_exists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1068]
  #6 <#3> Filesystem::pathExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1169]
  #7 <#3> Filesystem::assertExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1020]
  #8 <#3> Filesystem::isDescendant(NULL, string) called at [<phorge>/src/view/widget/AphrontStackTraceView.php:33]
  #9 <#3> AphrontStackTraceView::render() called at [<phorge>/src/view/AphrontView.php:222]
  #10 <#3> AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115]
  #11 <#3> phutil_escape_html(AphrontStackTraceView) called at [<phorge>/src/infrastructure/markup/render.php:139]
  #12 <#3> phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:97]
  #13 <#3> phutil_tag(string, array, array) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:62]
  #14 <#3> PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #15 <#3> AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #16 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #17 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
  #18 phlog(PhutilAggregateException) called at [<phorge>/src/aphront/response/AphrontUnhandledExceptionResponse.php:32]
  #19 AphrontUnhandledExceptionResponse::setException(PhutilAggregateException) called at [<phorge>/webroot/index.php:46]

Fix that exception; then repeat steps 2-7 above. Afterwards, page Email Addresses at http://phorge.localhost/settings/panel/email/ is correctly rendered, and the additional email address is listed.

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.