diff --git a/vendor/magento/module-staging/Model/Update/UpdateValidator.php b/vendor/magento/module-staging/Model/Update/UpdateValidator.php index 3be0dab0ba0..66add0f097e 100644 --- a/vendor/magento/module-staging/Model/Update/UpdateValidator.php +++ b/vendor/magento/module-staging/Model/Update/UpdateValidator.php @@ -43,14 +43,12 @@ class UpdateValidator { /** @var \DateTime $currentDateTime */ $currentDateTime = new \DateTime(); + $startTime = strtotime($stagingData['start_time']); + $updateStartTime = $update->getStartTime() ? strtotime($update->getStartTime()) : 0; - if ((strtotime($stagingData['start_time']) < $currentDateTime->getTimestamp()) - && (strtotime($update->getStartTime()) !== strtotime($stagingData['start_time'])) - ) { + if ($updateStartTime < $currentDateTime->getTimestamp() && $updateStartTime !== $startTime) { throw new LocalizedException( - __( - "The Start Time of this Update cannot be changed. It's been already started." - ) + __("The Start Time of this Update cannot be changed. It's been already started.") ); } }