Page MenuHomePhorge

PHP 8.1 "strlen(null)" exceptions block rendering a project page
Closed, ResolvedPublic

Description

  1. PHP 8.1.8, D25144, D25145, D25146, D25147, D25151, D25152, D25153 locally applied
  2. Create a project
  3. Go to that project's page at http://phorge.localhost/project/view/1/
[2023-04-30 18:28:12] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=82d1abd4edd1), phorge(head=D25163, ref.master=5a0d82df7f86, ref.D25163=5a0d82df7f86)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/project/state/PhabricatorWorkboardViewState.php:44]
  #1 <#2> PhabricatorWorkboardViewState::readFromRequest(AphrontRequest) called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardController.php:22]
  #2 <#2> PhabricatorProjectBoardController::newViewState() called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardController.php:10]
  #3 <#2> PhabricatorProjectBoardController::getViewState() called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:19]
  #4 <#2> PhabricatorProjectBoardViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/AphrontController.php:71]
  #5 <#2> AphrontController::delegateToController(PhabricatorProjectBoardViewController) called at [<phorge>/src/applications/project/controller/PhabricatorProjectViewController.php:45]
  #6 <#2> PhabricatorProjectViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #7 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #8 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #9 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #10 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #11 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that line by replacing strlen with phutil_nonempty_string; then get next exception:

[2023-04-30 18:29:41] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=82d1abd4edd1), phorge(head=D25163, ref.master=5a0d82df7f86, ref.D25163=5a0d82df7f86)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/project/state/PhabricatorWorkboardViewState.php:172]
  #1 <#2> PhabricatorWorkboardViewState::getQueryKey() called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:23]
  #2 <#2> PhabricatorProjectBoardViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/AphrontController.php:71]
  #3 <#2> AphrontController::delegateToController(PhabricatorProjectBoardViewController) called at [<phorge>/src/applications/project/controller/PhabricatorProjectViewController.php:45]
  #4 <#2> PhabricatorProjectViewController::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:204]
  #9 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

Fix that line by replacing strlen with phutil_nonempty_string; then get next exception:

[2023-04-30 18:30:41] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=82d1abd4edd1), phorge(head=D25163, ref.master=5a0d82df7f86, ref.D25163=5a0d82df7f86)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/project/state/PhabricatorWorkboardViewState.php:206]
  #1 <#2> PhabricatorWorkboardViewState::getDefaultQueryKey() called at [<phorge>/src/applications/project/state/PhabricatorWorkboardViewState.php:176]
  #2 <#2> PhabricatorWorkboardViewState::getQueryKey() called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:23]
  #3 <#2> PhabricatorProjectBoardViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/AphrontController.php:71]
  #4 <#2> AphrontController::delegateToController(PhabricatorProjectBoardViewController) called at [<phorge>/src/applications/project/controller/PhabricatorProjectViewController.php:45]
  #5 <#2> PhabricatorProjectViewController::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]

Fix that line by replacing strlen with phutil_nonempty_string; then get next exception which is already covered by T15263 instead:

[2023-04-30 18:31:31] EXCEPTION: (RuntimeException) rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=82d1abd4edd1), phorge(head=D25163, ref.master=5a0d82df7f86, ref.D25163=5a0d82df7f86)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #1 <#2> rawurlencode(NULL) called at [<arcanist>/src/utils/utils.php:1891]
  #2 <#2> phutil_escape_uri(NULL) called at [<arcanist>/src/xsprintf/urisprintf.php:35]
  #3 <#2> xsprintf_uri(NULL, string, integer, NULL, integer) called at [<arcanist>/src/xsprintf/xsprintf.php:82]
  #4 <#2> xsprintf(string, NULL, array) called at [<arcanist>/src/xsprintf/urisprintf.php:19]
  #5 <#2> urisprintf(string, string, NULL) called at [<phorge>/src/applications/project/state/PhabricatorWorkboardViewState.php:106]
  #6 <#2> PhabricatorWorkboardViewState::newWorkboardURI() called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:393]
  #7 <#2> PhabricatorProjectBoardViewController::buildSortMenu(PhabricatorUser, PhabricatorProject, string, array) called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:310]
  #8 <#2> PhabricatorProjectBoardViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/AphrontController.php:71]
  #9 <#2> AphrontController::delegateToController(PhabricatorProjectBoardViewController) called at [<phorge>/src/applications/project/controller/PhabricatorProjectViewController.php:45]
  #10 <#2> PhabricatorProjectViewController::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:204]
  #15 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

[2023-04-30 18:31:31] EXCEPTION: (PhutilAggregateException) Encountered a processing exception, then another exception when trying to build a response for the first exception.
    - RuntimeException: strncmp(): Passing null to parameter #1 ($string1) of type string is deprecated
    - RuntimeException: rawurlencode(): Passing null to parameter #1 ($string) of type string is deprecated at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:316]
arcanist(head=master, ref.master=82d1abd4edd1), phorge(head=D25163, ref.master=5a0d82df7f86, ref.D25163=5a0d82df7f86)
  #0 <#4> rawurlencode(NULL) called at [<arcanist>/src/utils/utils.php:1891]
  #1 <#4> phutil_escape_uri(NULL) called at [<arcanist>/src/xsprintf/urisprintf.php:35]
  #2 <#4> xsprintf_uri(NULL, string, integer, NULL, integer) called at [<arcanist>/src/xsprintf/xsprintf.php:82]
  #3 <#4> xsprintf(string, NULL, array) called at [<arcanist>/src/xsprintf/urisprintf.php:19]
  #4 <#4> urisprintf(string, string, NULL) called at [<phorge>/src/applications/project/state/PhabricatorWorkboardViewState.php:106]
  #5 <#4> PhabricatorWorkboardViewState::newWorkboardURI() called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:393]
  #6 <#4> PhabricatorProjectBoardViewController::buildSortMenu(PhabricatorUser, PhabricatorProject, string, array) called at [<phorge>/src/applications/project/controller/PhabricatorProjectBoardViewController.php:310]
  #7 <#4> PhabricatorProjectBoardViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/AphrontController.php:71]
  #8 <#4> AphrontController::delegateToController(PhabricatorProjectBoardViewController) called at [<phorge>/src/applications/project/controller/PhabricatorProjectViewController.php:45]
  #9 <#4> PhabricatorProjectViewController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #10 <#3> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #11 <#3> strncmp(NULL, string, integer) called at [<arcanist>/src/filesystem/Filesystem.php:934]
  #12 <#3> Filesystem::isAbsolutePath(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:949]
  #13 <#3> Filesystem::resolvePath(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:859]
  #14 <#3> Filesystem::walkToRoot(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1180]
  #15 <#3> Filesystem::assertExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1020]
  #16 <#3> Filesystem::isDescendant(NULL, string) called at [<phorge>/src/view/widget/AphrontStackTraceView.php:33]
  #17 <#3> AphrontStackTraceView::render() called at [<phorge>/src/view/AphrontView.php:222]
  #18 <#3> AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115]
  #19 <#3> phutil_escape_html(AphrontStackTraceView) called at [<phorge>/src/infrastructure/markup/render.php:139]
  #20 <#3> phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:97]
  #21 <#3> phutil_tag(string, array, array) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:67]
  #22 <#3> PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #23 <#3> AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #24 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:204]
  #25 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
  #26 phlog(PhutilAggregateException) called at [<phorge>/src/aphront/response/AphrontUnhandledExceptionResponse.php:32]
  #27 AphrontUnhandledExceptionResponse::setException(PhutilAggregateException) called at [<phorge>/webroot/index.php:46]

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.