PHP casts an array key which is a string that contains a decimal integer automatically into int type.
Quoting https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax: "Strings containing valid decimal ints, unless the number is preceded by a + sign, will be cast to the int type."
As we check git branch names via phutil_nonempty_string($key), this throws an exception.
Thus explicitly cast the int to string.
Closes T15640.