From 68cfcd98381e8dc2d711af27cdd98bce5814d3e2 Mon Sep 17 00:00:00 2001 From: Addison <8360474+addison74@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:00:47 +0200 Subject: [PATCH] [PHP 8.x] Deprecated functionality: strtotime(): Passing null to parameter #1 ($datetime) (#4339) --- app/code/core/Mage/CatalogRule/Model/Resource/Rule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php b/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php index 7d7c46830ba..84d4cf03db8 100644 --- a/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php +++ b/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php @@ -183,8 +183,8 @@ public function insertRuleData(Mage_CatalogRule_Model_Rule $rule, array $website $customerGroupIds = $rule->getCustomerGroupIds(); - $fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getFromDate())); - $toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getToDate())); + $fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime((string) $rule->getFromDate())); + $toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime((string) $rule->getToDate())); $toTime = $toTime ? ($toTime + self::SECONDS_IN_DAY - 1) : 0; $timestamp = time();