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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user