Skip to content

Commit 7af375e

Browse files
authored
strtotime() expects parameter 1 to be string, int ...security/Model/AdminSessionsManager.php(338)
TypeError: strtotime() expects parameter 1 to be string, int given #28 /var/www/share/meevo.io/releases/66/vendor/magento/module-security/Model/AdminSessionsManager.php(338):
1 parent 51b2821 commit 7af375e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,11 @@ protected function createAdminSessionInfoCollection()
335335
*/
336336
private function lastProlongIsOldEnough()
337337
{
338-
$lastProlongTimestamp = strtotime($this->getCurrentSession()->getUpdatedAt());
338+
$lastUpdatedTime = $this->getCurrentSession()->getUpdatedAt();
339+
if($lastUpdatedTime === null || is_numeric($lastUpdatedTime)) {
340+
$lastUpdatedTime = "now";
341+
}
342+
$lastProlongTimestamp = strtotime($lastUpdatedTime);
339343
$nowTimestamp = $this->authSession->getUpdatedAt();
340344

341345
$diff = $nowTimestamp - $lastProlongTimestamp;

0 commit comments

Comments
 (0)