Page MenuHomePhorge

PHP 8.1 "strlen(null)" exception when running "arc diff" with no active branch
Closed, ResolvedPublic

Description

Bug with arcanist when running "arc diff" without an active branch. Trace:

>>> [50] (+9,233) <exec> $ git symbolic-ref --quiet HEAD
<<< [50] (+9,235) <exec> 1,791 us

[2023-05-22 10:35:55] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261]
arcanist(), tmphutil()
  #0 PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2484]
  #1 ArcanistDiffWorkflow::getDiffOntoTargets() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:2462]
  #2 ArcanistDiffWorkflow::updateOntoDiffProperty() called at [<arcanist>/src/workflow/ArcanistDiffWorkflow.php:435]
  #3 ArcanistDiffWorkflow::run() called at [<arcanist>/scripts/arcanist.php:427]
<<< [1] (+9,273) <exec> 9,273,390 us

I've found a fix in the phabricator repo and I think the same should be applied here: https://secure.phabricator.com/rARCc39ab20eb3717a15aed2467842bd77d9addce96a

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.