Page MenuHomePhorge

Allow branch names to be integer values to avoid an InvalidArgumentException
AbandonedPublic

Authored by aklapper on Sep 16 2023, 13:51.
Tags
None
Referenced Files
F3319308: D25438.1743303794.diff
Sat, Mar 29, 03:03
F3306315: D25438.1743126926.diff
Thu, Mar 27, 01:55
F3302009: D25438.1743061126.diff
Wed, Mar 26, 07:38
F3295555: D25438.1742956079.diff
Tue, Mar 25, 02:27
F3290128: D25438.1742859192.diff
Sun, Mar 23, 23:33
F3285542: D25438.1742803640.diff
Sun, Mar 23, 08:07
F3285125: D25438.1742793771.diff
Sun, Mar 23, 05:22
F3282128: D25438.1742706621.diff
Sat, Mar 22, 05:10

Details

Summary

phutil_nonempty_string() is too strict for branch names, as there seem to be
cases that an integer value is passed. Thus us phutil_nonempty_scalar() instead.

EXCEPTION: (InvalidArgumentException) Call to phutil_nonempty_string() expected null or a string, got: int. at [<arcanist>/src/utils/utils.php:2124]
 arcanist(), ava(), phorge(), translations(), wmf-ext-misc()
   #0 <#2> phutil_nonempty_string(integer) called at [<phorge>/src/applications/repository/storage/PhabricatorRepository.php:749]

Closes T15640

Test Plan

Unknown

Diff Detail

Repository
rP Phorge
Branch
T15640 (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 844
Build 844: arc lint + arc unit

Event Timeline

avivey requested changes to this revision.Sep 17 2023, 07:35
avivey subscribed.

Why would a branch name be an integer and not a string?

Without a test plan / reproduction, these kind of changes could be hiding a real issue.

This revision now requires changes to proceed.Sep 17 2023, 07:35

Abandoning per last comment; guess we should debug a bit more first in downstream to understand the root cause better