Skip to content

Instantly share code, notes, and snippets.

@scgoeswild
Created March 21, 2022 12:35
Show Gist options
  • Save scgoeswild/6af1a4d3872599741c6740bd92b5cd92 to your computer and use it in GitHub Desktop.
Save scgoeswild/6af1a4d3872599741c6740bd92b5cd92 to your computer and use it in GitHub Desktop.
TypeError: strtotime() expects parameter 1 to be string, null given in /vendor/magento/module-security/Model/AdminSessionInfo.php:136
#/home/production/vendor/magento/module-security/Model/AdminSessionInfo.php:136
public function isSessionExpired()
{
$lifetime = $this->securityConfig->getAdminSessionLifetime();
$currentTime = $this->dateTime->gmtTimestamp();
$lastUpdatedTime = $this->getUpdatedAt();
if (empty($lastUpdatedTime)) {
return true;
}
if (!is_numeric($lastUpdatedTime)) {
$lastUpdatedTime = strtotime($lastUpdatedTime);
}
return $lastUpdatedTime <= ($currentTime - $lifetime) ? true : false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment