From 7ebc47d906fecc5b7952baeb8f25c4d69f5604ba Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 17 Nov 2016 10:23:39 -0800 Subject: [PATCH] (stable) Fix an EditEngine issue with unlocking fields which can't be locked Summary: This code should go inside the field-locking loop. Otherwise, it only applies to the last field, and fatals if there are no fields. Test Plan: Carefuller inspection. Reviewers: chad Reviewed By: chad Subscribers: 20after4 Differential Revision: https://secure.phabricator.com/D16889 --- .../storage/PhabricatorEditEngineConfiguration.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php index fc778c65b7..c1b1308801 100644 --- a/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php +++ b/src/applications/transactions/storage/PhabricatorEditEngineConfiguration.php @@ -158,11 +158,11 @@ final class PhabricatorEditEngineConfiguration // If we don't have an explicit value, don't make any adjustments. break; } - } - // If the field isn't lockable, remove any lock we applied. - if (!$field->getIsLockable()) { - $field->setIsLocked(false); + // If the field isn't lockable, remove any lock we applied. + if (!$field->getIsLockable()) { + $field->setIsLocked(false); + } } $fields = $this->reorderFields($fields);