diff --git a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php --- a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php @@ -37,7 +37,7 @@ $repository = $drequest->getRepository(); $path = $request->getValue('path'); - if (!strlen($path) || $path === '/') { + if (!phutil_nonempty_string($path) || $path === '/') { $path = null; } diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -22,7 +22,7 @@ // list. $grep = $request->getStr('grep'); - if (strlen($grep)) { + if ($grep) { return $this->browseSearch(); }