Page MenuHomePhorge

PHP 8.1 "strlen(null)" exceptions in PhabricatorEditEngine handling empty comment metadata in AphrontRequest
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. PHP 8.3.8; Phorge at f8b8d8876d56ea7b0f6fd59ad4506d73819ebfec
  2. Change https://we.phorge.it/source/phorge/browse/master/src/applications/transactions/editengine/PhabricatorEditEngine.php$1898 from if (!$request->isFormOrHisecPost()) { to (non-sensical) if (!$request->isFormOrHisecPost() && $request->getBool('editEngine')) {
  3. Change Priority and Status value of a task without adding a text comment
[2024-06-24 13:09:19] ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/transactions/editengine/PhabricatorEditEngine.php:1923]
arcanist(head=master, ref.master=21fbc806e4e1), ava(head=wmf/stable, ref.master=d3f5a1c67bb4, ref.wmf/stable=0b414fb56fe3), phorge(head=master, ref.master=f8b8d8876d56), translations(head=wmf/stable, ref.master=09fe573a932a, ref.wmf/stable=c81eb9d9e8d9)
  #0 PhabricatorEditEngine::buildCommentResponse(ManiphestTask) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1008]
  #1 PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/maniphest/controller/ManiphestTaskEditController.php:12]
  #2 ManiphestTaskEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #3 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #4 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
  
[2024-06-24 13:09:19] ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/transactions/editengine/PhabricatorEditEngine.php:2023]
arcanist(head=master, ref.master=21fbc806e4e1), ava(head=wmf/stable, ref.master=d3f5a1c67bb4, ref.wmf/stable=0b414fb56fe3), phorge(head=master, ref.master=f8b8d8876d56), translations(head=wmf/stable, ref.master=09fe573a932a, ref.wmf/stable=c81eb9d9e8d9)
  #0 PhabricatorEditEngine::buildCommentResponse(ManiphestTask) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1008]
  #1 PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/maniphest/controller/ManiphestTaskEditController.php:12]
  #2 ManiphestTaskEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #3 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #4 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.