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
F2990006: D25438.1740168320.diff
Thu, Feb 20, 20:05
F2989935: D25438.1740167810.diff
Thu, Feb 20, 19:56
F2982373: D25438.1739954517.diff
Tue, Feb 18, 08:41
F2943633: D25438.1738210392.diff
Wed, Jan 29, 04:13
F2941171: D25438.1738098628.diff
Mon, Jan 27, 21:10
F2904655: D25438.1737331472.diff
Jan 19 2025, 00:04
F2904647: D25438.1737331347.diff
Jan 19 2025, 00:02
F2904646: D25438.1737331312.diff
Jan 19 2025, 00:01

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