Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2699052
D25339.1735025564.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25339.1735025564.diff
View Options
diff --git a/src/browse/query/ArcanistBrowseObjectNameURIHardpointQuery.php b/src/browse/query/ArcanistBrowseObjectNameURIHardpointQuery.php
--- a/src/browse/query/ArcanistBrowseObjectNameURIHardpointQuery.php
+++ b/src/browse/query/ArcanistBrowseObjectNameURIHardpointQuery.php
@@ -15,7 +15,7 @@
$token_set = array();
foreach ($refs as $key => $ref) {
$token = $ref->getToken();
- if (!strlen($token)) {
+ if (!phutil_nonempty_string($token)) {
continue;
}
@@ -41,7 +41,7 @@
continue;
}
- $uri = idx($object, 'uri');
+ $uri = idx($object, 'uri', '');
if (!strlen($uri)) {
continue;
}
diff --git a/src/browse/workflow/ArcanistBrowseWorkflow.php b/src/browse/workflow/ArcanistBrowseWorkflow.php
--- a/src/browse/workflow/ArcanistBrowseWorkflow.php
+++ b/src/browse/workflow/ArcanistBrowseWorkflow.php
@@ -142,7 +142,7 @@
if ($many_hits) {
foreach ($many_hits as $ref) {
$token = $ref->getToken();
- if (strlen($token)) {
+ if (phutil_nonempty_string($token)) {
$message = pht('Argument "%s" is ambiguous.', $token);
} else {
$message = pht('Default behavior is ambiguous.');
@@ -167,7 +167,7 @@
foreach ($many_hits as $ref) {
$token_display = $ref->getToken();
- if (!strlen($token)) {
+ if (!phutil_nonempty_string($token)) {
$token_display = pht('<default>');
}
diff --git a/src/ref/ArcanistRepositoryRef.php b/src/ref/ArcanistRepositoryRef.php
--- a/src/ref/ArcanistRepositoryRef.php
+++ b/src/ref/ArcanistRepositoryRef.php
@@ -80,7 +80,9 @@
$params = $params + $defaults;
$uri_base = $this->browseURI;
- $uri_base = rtrim($uri_base, '/');
+ if ($uri_base !== null) {
+ $uri_base = rtrim($uri_base, '/');
+ }
$uri_branch = phutil_escape_uri_path_component($params['branch']);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 07:32 (4 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1028006
Default Alt Text
D25339.1735025564.diff (1 KB)
Attached To
Mode
D25339: Improve arc-browse for php 8.1
Attached
Detach File
Event Timeline
Log In to Comment