Skip to content

Commit 51b2821

Browse files
authored
main.CRITICAL: TypeError: strtotime() expects parameter 1 to be string, null
main.CRITICAL: TypeError: strtotime() expects parameter 1 to be string, null given in ...security/Model/AdminSessionInfo.php:136
1 parent a262a50 commit 51b2821

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Security/Model/AdminSessionInfo.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ public function isSessionExpired()
133133
$currentTime = $this->dateTime->gmtTimestamp();
134134
$lastUpdatedTime = $this->getUpdatedAt();
135135
if (!is_numeric($lastUpdatedTime)) {
136-
$lastUpdatedTime = strtotime($lastUpdatedTime);
136+
if($lastUpdatedTime === null) {
137+
$lastUpdatedTime = 0;
138+
}else {
139+
$lastUpdatedTime = strtotime($lastUpdatedTime);
140+
}
137141
}
138142

139143
return $lastUpdatedTime <= ($currentTime - $lifetime) ? true : false;

0 commit comments

Comments
 (0)