diff --git a/app/code/Magento/Rule/Model/AbstractModel.php b/app/code/Magento/Rule/Model/AbstractModel.php index e29d2b217d717..d54bcf691d3b0 100644 --- a/app/code/Magento/Rule/Model/AbstractModel.php +++ b/app/code/Magento/Rule/Model/AbstractModel.php @@ -335,7 +335,7 @@ protected function _convertFlatToRecursive(array $data) /** * Convert dates into \DateTime */ - if (in_array($key, ['from_date', 'to_date']) && $value) { + if (in_array($key, ['from_date', 'to_date'], true) && $value) { $value = new \DateTime($value); } $this->setData($key, $value);