Skip to content

PHP 8 crash: TypeError: strtotime(): Argument #1 ($datetime) must be of type string, null given in vendor/magento/module-security/Model/AdminSessionInfo.php:136 #35837

Open
@snez

Description

@snez

Preconditions and environment

  • Magento version 2.4.4
  • PHP 8.x

Steps to reproduce

Enabled and rolled db backup as per Devdocs
On running the command bin/magento setup:rollback [-c|--code-file=""] [-m|--media-file=""] [-d|--db-file=""], below php error is getting displayed on both the instances.

Expected result

Restore DB backup is successful.

Actual result

main.ERROR: SQLSTATE[HY000]: General error: 1100 Table 'queue_lock' was not locked with LOCK TABLES, query was: DELETE FROM `queue_lock` WHERE (created_at <= '2022-07-28 11:23:15') #0 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php(91): Magento\Framework\DB\Statement\Pdo\Mysql->tryExecute() #1 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement.php(313): Magento\Framework\DB\Statement\Pdo\Mysql->_execute() #2 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute() #3 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query() #4 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(564): Zend_Db_Adapter_Pdo_Abstract->query() #5 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/DB/Adapter/Pdo/Mysql.php(634): Magento\Framework\DB\Adapter\Pdo\Mysql->_query() #6 /var/www/html/mgce/magento2/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(95): Magento\Framework\DB\Adapter\Pdo\Mysql->query() #7 /var/www/html/mgce/magento2/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(664): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->query() #8 /var/www/html/mgce/magento2/generated/code/Magento/Framework/DB/Adapter/Pdo/Mysql/Interceptor.php(1067): Zend_Db_Adapter_Abstract->delete() #9 /var/www/html/mgce/magento2/app/code/Magento/MessageQueue/Model/ResourceModel/Lock.php(103): Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor->delete() #10 /var/www/html/mgce/magento2/app/code/Magento/MessageQueue/Model/Plugin/ResourceModel/Lock.php(39): Magento\MessageQueue\Model\ResourceModel\Lock->releaseOutdatedLocks() #11 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\MessageQueue\Model\Plugin\ResourceModel\Lock->afterSet() #12 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\App\MaintenanceMode\Interceptor->Magento\Framework\Interception\{closure}() #13 /var/www/html/mgce/magento2/generated/code/Magento/Framework/App/MaintenanceMode/Interceptor.php(32): Magento\Framework\App\MaintenanceMode\Interceptor->___callPlugins() #14 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/App/Console/MaintenanceModeEnabler.php(67): Magento\Framework\App\MaintenanceMode\Interceptor->set() #15 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/App/Console/MaintenanceModeEnabler.php(93): Magento\Framework\App\Console\MaintenanceModeEnabler->disableMaintenanceMode() #16 /var/www/html/mgce/magento2/setup/src/Magento/Setup/Console/Command/RollbackCommand.php(154): Magento\Framework\App\Console\MaintenanceModeEnabler->executeInMaintenanceMode() #17 /var/www/html/mgce/magento2/vendor/symfony/console/Command/Command.php(298): Magento\Setup\Console\Command\RollbackCommand->execute() #18 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(1024): Symfony\Component\Console\Command\Command->run() #19 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand() #20 /var/www/html/mgce/magento2/lib/internal/Magento/Framework/Console/Cli.php(116): Symfony\Component\Console\Application->doRun() #21 /var/www/html/mgce/magento2/vendor/symfony/console/Application.php(171): Magento\Framework\Console\Cli->doRun() #22 /var/www/html/mgce/magento2/bin/magento(23): Symfony\Component\Console\Application->run() #23 {main} [] []

Additional information

No response

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions