Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception blocks rendering Pholio mock preview
Closed, ResolvedPublic

Description

  1. PHP 8.2.5; Phorge at 651e3f7263b58e46cd65285cce7ba266af480aef
  2. Go to http://phorge.localhost/pholio/
  3. Select Create a Mock button
  4. Select "Click here, or drag and drop images to add them to the mock."
  5. Select an image in the file chooser
  6. Select the Upload button
  7. Upload completes, page shows Upload Complete... but no image is shown && exception is shown as a popup overlay.
[2023-05-06 09:40:53] 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=createPholio, ref.master=651e3f7263b5, ref.createPholio=651e3f7263b5)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/pholio/controller/PholioImageUploadController.php:21]
  #1 <#2> PholioImageUploadController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #2 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #3 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #4 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #6 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

After fixing that line, after uploading an image file, image preview + Title field + Description field are correctly displayed on in http://phorge.localhost/pholio/create/

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.