Skip to content

Commit 70ec805

Browse files
author
epriestley
committedMay 28, 2014
Fix issue when editing a project with no secondary hash tags
Summary: Fixes T5186. If a project has no secondary tags, we issue a bogus query right now. Test Plan: Edited a project with no secondary tags. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T5186 Differential Revision: https://secure.phabricator.com/D9300
1 parent 92ccada commit 70ec805

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed
 

‎src/applications/project/editor/PhabricatorProjectTransactionEditor.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,15 @@ protected function validateTransaction(
305305

306306
$slug_xaction = last($xactions);
307307
$new = $slug_xaction->getNewValue();
308-
$slugs_used_already = id(new PhabricatorProjectSlug())
309-
->loadAllWhere('slug IN (%Ls)', $new);
308+
309+
if ($new) {
310+
$slugs_used_already = id(new PhabricatorProjectSlug())
311+
->loadAllWhere('slug IN (%Ls)', $new);
312+
} else {
313+
// The project doesn't have any extra slugs.
314+
$slugs_used_already = array();
315+
}
316+
310317
$slugs_used_already = mgroup($slugs_used_already, 'getProjectPHID');
311318
foreach ($slugs_used_already as $project_phid => $used_slugs) {
312319
$used_slug_strs = mpull($used_slugs, 'getSlug');

0 commit comments

Comments
 (0)
Failed to load comments.