Page MenuHomePhorge

PHP 8.1 "preg_match(null)"/"strlen(null)" exceptions importing ics file with no attendee names into calendar
Closed, ResolvedPublic

Description

  1. PHP 8.3.8; Phorge at a83ba95445e18e9d98d4dd120d38ca713df25fba
  2. Import an ICS file which only lists email addresses but no names as invitees; see D25363#18825

Note: line numbers below refer to the branch for D25363, not to git master.

[2024-06-10 15:59:57] ERROR 8192: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/calendar/import/PhabricatorCalendarImportEngine.php:252]
arcanist(head=master, ref.master=6250296648fa), ava(head=wmf/stable, ref.master=d3f5a1c67bb4, ref.wmf/stable=0b414fb56fe3), phorge(head=arcpatch-D25363, ref.master=a83ba95445e1, ref.arcpatch-D25363=0d7272a07267), translations(head=wmf/stable, ref.master=09fe573a932a, ref.wmf/stable=c81eb9d9e8d9)
  #0 preg_match(string, NULL) called at [<phorge>/src/applications/calendar/import/PhabricatorCalendarImportEngine.php:252]
  #1 PhabricatorCalendarImportEngine::importEventDocument(PhabricatorUser, PhabricatorCalendarImport, PhutilCalendarRootNode) called at [<phorge>/src/applications/calendar/import/PhabricatorCalendarICSImportEngine.php:42]
  #2 PhabricatorCalendarICSImportEngine::importICSData(PhabricatorUser, PhabricatorCalendarImport, string) called at [<phorge>/src/applications/calendar/import/PhabricatorCalendarICSFileImportEngine.php:91]
  #3 PhabricatorCalendarICSFileImportEngine::importEventsFromSource(PhabricatorUser, PhabricatorCalendarImport, boolean) called at [<phorge>/src/applications/calendar/editor/PhabricatorCalendarImportEditor.php:57]
  #4 PhabricatorCalendarImportEditor::applyFinalEffects(PhabricatorCalendarImport, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1412]
  #5 PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorCalendarImport, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #6 PhabricatorEditEngine::buildEditResponse(PhabricatorCalendarImport) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #7 PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php:42]
  #8 PhabricatorCalendarImportEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #9 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #10 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
[2024-06-10 15:59:57] ERROR 8192: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [/var/www/html/phorge/phorge/src/applications/calendar/import/PhabricatorCalendarImportEngine.php:269]
arcanist(head=master, ref.master=6250296648fa), ava(head=wmf/stable, ref.master=d3f5a1c67bb4, ref.wmf/stable=0b414fb56fe3), phorge(head=arcpatch-D25363, ref.master=a83ba95445e1, ref.arcpatch-D25363=0d7272a07267), translations(head=wmf/stable, ref.master=09fe573a932a, ref.wmf/stable=c81eb9d9e8d9)
  #0 PhabricatorCalendarImportEngine::importEventDocument(PhabricatorUser, PhabricatorCalendarImport, PhutilCalendarRootNode) called at [<phorge>/src/applications/calendar/import/PhabricatorCalendarICSImportEngine.php:42]
  #1 PhabricatorCalendarICSImportEngine::importICSData(PhabricatorUser, PhabricatorCalendarImport, string) called at [<phorge>/src/applications/calendar/import/PhabricatorCalendarICSFileImportEngine.php:91]
  #2 PhabricatorCalendarICSFileImportEngine::importEventsFromSource(PhabricatorUser, PhabricatorCalendarImport, boolean) called at [<phorge>/src/applications/calendar/editor/PhabricatorCalendarImportEditor.php:57]
  #3 PhabricatorCalendarImportEditor::applyFinalEffects(PhabricatorCalendarImport, array) called at [<phorge>/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php:1412]
  #4 PhabricatorApplicationTransactionEditor::applyTransactions(PhabricatorCalendarImport, array) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1149]
  #5 PhabricatorEditEngine::buildEditResponse(PhabricatorCalendarImport) called at [<phorge>/src/applications/transactions/editengine/PhabricatorEditEngine.php:1000]
  #6 PhabricatorEditEngine::buildResponse() called at [<phorge>/src/applications/calendar/controller/PhabricatorCalendarImportEditController.php:42]
  #7 PhabricatorCalendarImportEditController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #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]