Page MenuHomePhorge

PHP 8.1 "base64_decode(null)" exception calling Conduit's file.upload with no data passed
Closed, ResolvedPublic

Description

  1. PHP 8.2.6; Phorge at 0d81da5909239d404b92f69848b858257b564b4e
  2. Go to http://phorge.localhost/conduit/
  3. Select file.upload to go to http://phorge.localhost/conduit/method/file.upload/
  4. Enter no data, select Call Method button
[2023-05-29 11:21:59] EXCEPTION: (RuntimeException) base64_decode(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(head=master, ref.master=18554ea76ceb), phorge(head=conduitDashboardPanelEdit, ref.master=0d81da590923, ref.conduitDashboardPanelEdit=ab4391b30465)
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261]
  #1 <#2> base64_decode(NULL, boolean) called at [<phorge>/src/applications/files/conduit/FileConduitAPIMethod.php:84]
  #2 <#2> FileConduitAPIMethod::decodeBase64(NULL) called at [<phorge>/src/applications/files/conduit/FileUploadConduitAPIMethod.php:34]
  #3 <#2> FileUploadConduitAPIMethod::execute(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/method/ConduitAPIMethod.php:156]
  #4 <#2> ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/call/ConduitCall.php:131]
  #5 <#2> ConduitCall::executeMethod() called at [<phorge>/src/applications/conduit/call/ConduitCall.php:81]
  #6 <#2> ConduitCall::execute() called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:83]
  #7 phlog(RuntimeException) called at [<phorge>/src/applications/conduit/controller/PhabricatorConduitAPIController.php:111]
  #8 PhabricatorConduitAPIController::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]