Skip to content

Commit 68cfcd9

Browse files
authored
[PHP 8.x] Deprecated functionality: strtotime(): Passing null to parameter #1 ($datetime) (OpenMage#4339)
1 parent 2bc4bec commit 68cfcd9

File tree

1 file changed

+2
-2
lines changed
  • app/code/core/Mage/CatalogRule/Model/Resource

1 file changed

+2
-2
lines changed

app/code/core/Mage/CatalogRule/Model/Resource/Rule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ public function insertRuleData(Mage_CatalogRule_Model_Rule $rule, array $website
183183

184184
$customerGroupIds = $rule->getCustomerGroupIds();
185185

186-
$fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getFromDate()));
187-
$toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime($rule->getToDate()));
186+
$fromTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime((string) $rule->getFromDate()));
187+
$toTime = (int) Mage::getModel('core/date')->gmtTimestamp(strtotime((string) $rule->getToDate()));
188188
$toTime = $toTime ? ($toTime + self::SECONDS_IN_DAY - 1) : 0;
189189

190190
$timestamp = time();

0 commit comments

Comments
 (0)