Skip to content

Commit

Permalink
Fix deprecated functionality: strtotime(): passing null to parameter #1
Browse files Browse the repository at this point in the history
… ($datetime) of type string is deprecated
  • Loading branch information
luigifab committed Oct 14, 2021
1 parent c7957d4 commit 1e8f87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public function getStoreLastLoginDateTimezone()
public function getCurrentStatus()
{
$log = $this->getCustomerLog();
if ($log->getLogoutAt() ||
strtotime(now())-strtotime($log->getLastVisitAt())>Mage_Log_Model_Visitor::getOnlineMinutesInterval()*60) {
if ($log->getLogoutAt() || (!empty($log->getLastVisitAt()) &&
(strtotime(now()) - strtotime($log->getLastVisitAt()) > Mage_Log_Model_Visitor::getOnlineMinutesInterval() * 60))) {
return Mage::helper('customer')->__('Offline');
}
return Mage::helper('customer')->__('Online');
Expand Down

0 comments on commit 1e8f87f

Please sign in to comment.