diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index ef469281ef..ce3ef41c9e 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -27,8 +27,9 @@ final class DiffusionCommitController extends DiffusionController { // If this page is being accessed via "/source/xyz/commit/...", redirect // to the canonical URI. - $has_callsign = strlen($request->getURIData('repositoryCallsign')); - $has_id = strlen($request->getURIData('repositoryID')); + $has_callsign = + phutil_nonempty_string($request->getURIData('repositoryCallsign')); + $has_id = phutil_nonempty_string($request->getURIData('repositoryID')); if (!$has_callsign && !$has_id) { $canonical_uri = $repository->getCommitURI($commit_identifier); return id(new AphrontRedirectResponse())