From 19d58564d1338dba2ee48d653e027b2e90099b2e Mon Sep 17 00:00:00 2001 From: David Reuss Date: Sat, 30 Jun 2012 06:26:23 -0700 Subject: [PATCH] Minor, don't show references in diffusion if there isn't any Summary: When there are no other references (and there will be none ususally, if D2891 is accepted), we would show "References:" with empty contents. Avoid that by testing for empty output after applying stupid filtering. Test Plan: Looked in a standard repository with no special refs. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2892 --- .../diffusion/controller/DiffusionCommitController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index b08544f59d..d76553e861 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -848,6 +848,10 @@ final class DiffusionCommitController extends DiffusionController { $refs = explode(',', $refs); $refs = array_map('trim', $refs); + if (!$refs) { + return null; + } + $ref_links = array(); foreach ($refs as $ref) { $ref_links[] = phutil_render_tag(