1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

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
This commit is contained in:
David Reuss 2012-06-30 06:43:27 -07:00 committed by epriestley
parent 19d58564d1
commit fd94700d69

View file

@ -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) {