diff --git a/src/workflow/ArcanistWorkflow.php b/src/workflow/ArcanistWorkflow.php --- a/src/workflow/ArcanistWorkflow.php +++ b/src/workflow/ArcanistWorkflow.php @@ -479,8 +479,8 @@ // If we have `token`, this server supports the simpler, new-style // token-based authentication. Use that instead of all the certificate // stuff. - $token = idx($credentials, 'token', ''); - if (strlen($token)) { + $token = idx($credentials, 'token'); + if (phutil_nonempty_string($token)) { $conduit = $this->getConduit(); $conduit->setConduitToken($token); @@ -2244,8 +2244,8 @@ protected function getModernUnitDictionary(array $map) { $map = $this->getModernCommonDictionary($map); - $details = idx($map, 'userData', ''); - if (strlen($details)) { + $details = idx($map, 'userData'); + if (phutil_nonempty_string($details)) { $map['details'] = (string)$details; } unset($map['userData']);