Page MenuHomePhorge

PHP 8.2 "strlen(null)" exception when viewing image details
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to a wiki page
  2. Click Edit Document
  3. Upload image file
  4. Click Save and Publish
  5. Click on newly uploaded image

Result:
Image is shown together with error message: strlen(): Passing null to parameter #1 ($string) of type string is deprecated

Stacktrace:

[Sun Jun 25 07:27:59.741574 2023] [php:notice] [::1:47474] [2023-06-25 05:27:59] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
[Sun Jun 25 07:27:59.741878 2023] [php:notice] [::1:47474] arcanist(head=master, ref.master=8130241a11ac), diagram(), example(), phorge(head=master, ref.master=a25af8ccef69, custom=1)
[Sun Jun 25 07:27:59.741885 2023] [php:notice] [::1:47474]   #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/files/controller/PhabricatorFileLightboxController.php:23]
[Sun Jun 25 07:27:59.741888 2023] [php:notice] [::1:47474]   #1 <#2> PhabricatorFileLightboxController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
[Sun Jun 25 07:27:59.741891 2023] [php:notice] [::1:47474]   #2 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
[Sun Jun 25 07:27:59.741893 2023] [php:notice] [::1:47474]   #3 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
[Sun Jun 25 07:27:59.741895 2023] [php:notice] [::1:47474]   #4 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
[Sun Jun 25 07:27:59.741897 2023] [php:notice] [::1:47474]   #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
[Sun Jun 25 07:27:59.741905 2023] [php:notice] [::1:47474]   #6 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]

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.

Event Timeline

I'm trying to reproduce this, but in my local installation I do not have any allowed file formats. I also do not remember how to make that list available.

OK I can reproduce now. I was missing the php-gd extension for some reasons.

OK I can reproduce now. I was missing the php-gd extension for some reasons.

@valerio.bozzolan: See T15326 about that issue...