Skip to content

Commit

Permalink
strtotime() expects parameter 1 to be string, int ...security/Model/A…
Browse files Browse the repository at this point in the history
…dminSessionsManager.php(338)

TypeError: strtotime() expects parameter 1 to be string, int given
magento#28 /var/www/share/meevo.io/releases/66/vendor/magento/module-security/Model/AdminSessionsManager.php(338):
  • Loading branch information
kanhaiya5590 committed Nov 3, 2021
1 parent 51b2821 commit 7af375e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/code/Magento/Security/Model/AdminSessionsManager.php
Expand Up @@ -335,7 +335,11 @@ protected function createAdminSessionInfoCollection()
*/
private function lastProlongIsOldEnough()
{
$lastProlongTimestamp = strtotime($this->getCurrentSession()->getUpdatedAt());
$lastUpdatedTime = $this->getCurrentSession()->getUpdatedAt();
if($lastUpdatedTime === null || is_numeric($lastUpdatedTime)) {
$lastUpdatedTime = "now";
}
$lastProlongTimestamp = strtotime($lastUpdatedTime);
$nowTimestamp = $this->authSession->getUpdatedAt();

$diff = $nowTimestamp - $lastProlongTimestamp;
Expand Down

0 comments on commit 7af375e

Please sign in to comment.