From 2de632d4fe98d7a0369d49c4669a7961122f6f16 Mon Sep 17 00:00:00 2001 From: Austin McKinley Date: Thu, 20 Dec 2018 13:50:15 -0800 Subject: [PATCH] Update continue/break for php 7.3 Summary: Fixes https://discourse.phabricator-community.org/t/error-on-project-creation-or-edition-with-php7-3/2236 I didn't actually repro this because I don't have php 7.3 installed. I'm also not sure if the `break; break` was intentional or not, since I'm not sure you could ever reach two consecutive break statements. Test Plan: Created some projects. Didn't actually try to hit the code that fires if you're making a project both a subproject and a milestone. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D19925 --- .../project/editor/PhabricatorProjectTransactionEditor.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php index 581ec23153..ee2c087085 100644 --- a/src/applications/project/editor/PhabricatorProjectTransactionEditor.php +++ b/src/applications/project/editor/PhabricatorProjectTransactionEditor.php @@ -55,12 +55,12 @@ final class PhabricatorProjectTransactionEditor case PhabricatorProjectParentTransaction::TRANSACTIONTYPE: case PhabricatorProjectMilestoneTransaction::TRANSACTIONTYPE: if ($xaction->getNewValue() === null) { - continue; + continue 2; } if (!$parent_xaction) { $parent_xaction = $xaction; - continue; + continue 2; } $errors[] = new PhabricatorApplicationTransactionValidationError( @@ -71,8 +71,7 @@ final class PhabricatorProjectTransactionEditor 'project or milestone project. A project can not be both a '. 'subproject and a milestone.'), $xaction); - break; - break; + break 2; } }