Skip to content

Commit

Permalink
[PHP 8.x] Deprecated functionality: strtotime(): Passing null to para…
Browse files Browse the repository at this point in the history
…meter #1 ($datetime) (#4339)
  • Loading branch information
addison74 authored Nov 10, 2024
1 parent 2bc4bec commit 68cfcd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/CatalogRule/Model/Resource/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 68cfcd9

Please sign in to comment.