Correct a PHP8 compatibility issue when running "arc diff" with no active branch
When there is no active branch name, arc diff currently fails under PHP8 when we try to strlen(null).
This change is also credited to Evan from upstream Phabricator that applied the same change:
Note: this may highlight other absurd input values that might be worth correcting
instead of just ignoring. If phutil_nonempty_string() throws an exception in your
instance, report it to Phorge to evaluate and fix that specific corner case.
Test Plan: Under PHP 8.1: ran git checkout <hash of head>, then arc diff to generate this revision.
Reviewers: O1 Blessed Committers, valerio.bozzolan
Reviewed By: O1 Blessed Committers, valerio.bozzolan
Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno
Maniphest Tasks: T15412
Differential Revision: https://we.phorge.it/D25237