From fd94700d697f5c1a3f4ea62273affe0861c757a0 Mon Sep 17 00:00:00 2001 From: David Reuss Date: Sat, 30 Jun 2012 06:43:27 -0700 Subject: [PATCH] Minor, really fix empty reference properties in diffusion Summary: Oh man, after the explode/map, the output when no references is actually array(1) { [0]=> string(0) "" } .. making the falsey check fail to work as expected. Test Plan: same as D2892, but with a little more scrutiny :p Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2893 --- .../diffusion/controller/DiffusionCommitController.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index d76553e861..893f0c308b 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -845,12 +845,11 @@ final class DiffusionCommitController extends DiffusionController { // %d, gives a weird output format // similar to (remote/one, remote/two, remote/three) $refs = trim($stdout, "() \n"); - $refs = explode(',', $refs); - $refs = array_map('trim', $refs); - if (!$refs) { return null; } + $refs = explode(',', $refs); + $refs = array_map('trim', $refs); $ref_links = array(); foreach ($refs as $ref) {