From 1fc04e238f1d656c0a1cbd9592a4a3253b5319cc Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 3 Jun 2022 14:26:34 -0700 Subject: [PATCH] Fix repository URI generation for SVN commit identifiers represented with integer types Summary: Ref T13588. See PHI2198. Some pathways represent SVN commit identifiers (which are numeric) with integers; these raise an exception in `phutil_nonempty_string()`, which is strict. (Ideally, commit identifiers wouldn't have mixed types, but that's a dramatically less practical change.) Test Plan: Will deploy. Maniphest Tasks: T13588 Differential Revision: https://secure.phabricator.com/D21852 --- src/applications/repository/storage/PhabricatorRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php index 0ac6687ef8..c68eb22668 100644 --- a/src/applications/repository/storage/PhabricatorRepository.php +++ b/src/applications/repository/storage/PhabricatorRepository.php @@ -752,7 +752,7 @@ final class PhabricatorRepository extends PhabricatorRepositoryDAO } $raw_commit = $commit; - if (phutil_nonempty_string($commit)) { + if (phutil_nonempty_scalar($commit)) { $commit = str_replace('$', '$$', $commit); $commit = ';'.phutil_escape_uri($commit); } -- 2.11.4.GIT