Page MenuHomePhorge

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

Asked by jkimbo on May 22 2023, 10:40.

Details

I think I've come across a 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

Answers

avivey
Updated 579 Days Ago

PHP 8 is not yet supported, sorry.

New Answer

Answer

This question has been marked as closed, but you can still leave a new answer.