mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-25 08:12:40 +01:00
Improve arc-browse for php 8.1
Summary: Ref T15064. Test Plan: ran some `arc browse` commands in php 8.1, got no exceptions. Reviewers: O1 Blessed Committers, valerio.bozzolan, Sten Reviewed By: O1 Blessed Committers, valerio.bozzolan, Sten Subscribers: Sten, speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T15064 Differential Revision: https://we.phorge.it/D25339
This commit is contained in:
parent
152ba1f02a
commit
6e4947b55f
3 changed files with 5 additions and 5 deletions
|
@ -15,7 +15,7 @@ final class ArcanistBrowseObjectNameURIHardpointQuery
|
||||||
$token_set = array();
|
$token_set = array();
|
||||||
foreach ($refs as $key => $ref) {
|
foreach ($refs as $key => $ref) {
|
||||||
$token = $ref->getToken();
|
$token = $ref->getToken();
|
||||||
if (!strlen($token)) {
|
if (!phutil_nonempty_string($token)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ final class ArcanistBrowseObjectNameURIHardpointQuery
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$uri = idx($object, 'uri');
|
$uri = idx($object, 'uri', '');
|
||||||
if (!strlen($uri)) {
|
if (!strlen($uri)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ EOTEXT
|
||||||
if ($many_hits) {
|
if ($many_hits) {
|
||||||
foreach ($many_hits as $ref) {
|
foreach ($many_hits as $ref) {
|
||||||
$token = $ref->getToken();
|
$token = $ref->getToken();
|
||||||
if (strlen($token)) {
|
if (phutil_nonempty_string($token)) {
|
||||||
$message = pht('Argument "%s" is ambiguous.', $token);
|
$message = pht('Argument "%s" is ambiguous.', $token);
|
||||||
} else {
|
} else {
|
||||||
$message = pht('Default behavior is ambiguous.');
|
$message = pht('Default behavior is ambiguous.');
|
||||||
|
@ -167,7 +167,7 @@ EOTEXT
|
||||||
|
|
||||||
foreach ($many_hits as $ref) {
|
foreach ($many_hits as $ref) {
|
||||||
$token_display = $ref->getToken();
|
$token_display = $ref->getToken();
|
||||||
if (!strlen($token)) {
|
if (!phutil_nonempty_string($token)) {
|
||||||
$token_display = pht('<default>');
|
$token_display = pht('<default>');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ final class ArcanistRepositoryRef
|
||||||
|
|
||||||
$params = $params + $defaults;
|
$params = $params + $defaults;
|
||||||
|
|
||||||
$uri_base = $this->browseURI;
|
$uri_base = coalesce($this->browseURI, '');
|
||||||
$uri_base = rtrim($uri_base, '/');
|
$uri_base = rtrim($uri_base, '/');
|
||||||
|
|
||||||
$uri_branch = phutil_escape_uri_path_component($params['branch']);
|
$uri_branch = phutil_escape_uri_path_component($params['branch']);
|
||||||
|
|
Loading…
Reference in a new issue