Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2647453
D25591.1732368647.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
D25591.1732368647.diff
View Options
diff --git a/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php b/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php
--- a/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php
+++ b/src/applications/almanac/management/AlmanacManagementRegisterWorkflow.php
@@ -38,7 +38,7 @@
$viewer = $this->getViewer();
$device_name = $args->getArg('device');
- if (!strlen($device_name)) {
+ if (!phutil_nonempty_string($device_name)) {
throw new PhutilArgumentUsageException(
pht('Specify a device with --device.'));
}
@@ -55,7 +55,7 @@
$identify_as = $args->getArg('identify-as');
$raw_device = $device_name;
- if (strlen($identify_as)) {
+ if (phutil_nonempty_string($identify_as)) {
$raw_device = $identify_as;
}
@@ -70,7 +70,7 @@
}
$private_key_path = $args->getArg('private-key');
- if (!strlen($private_key_path)) {
+ if (!phutil_nonempty_string($private_key_path)) {
throw new PhutilArgumentUsageException(
pht('Specify a private key with --private-key.'));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 13:30 (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
991543
Default Alt Text
D25591.1732368647.diff (1 KB)
Attached To
Mode
D25591: Fix PHP 8.1 "strlen(null)" exception for "/bin/almanac register" without parameter
Attached
Detach File
Event Timeline
Log In to Comment