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.