session_regenerate_id() to run6.1
No error; the query explains the collected or skipped items cleanly.
Fatal error:
Call to a member function getLogs() on null
at plugins/system/debug/src/Extension/Debug.php:490
Debug->onAfterDisconnect()
...DatabaseDriver->disconnect()
Session\Handler\DatabaseHandler->close()
session_regenerate_id()
Debug::__construct() assigns $this->queryMonitor = $this->getDatabase()->getMonitor().
DatabaseDriver::getMonitor() returns null when no monitor is attached
(which is legitimate — monitors are optional). The onAfterDisconnect()
guard only checks JDEBUG, not whether $this->queryMonitor was set, so
line 490 calls getLogs() on null whenever the disconnect event fires
with debug on but no monitor present (notably during session_regenerate_id
via Session\Handler\DatabaseHandler::close()).
Add a null guard on $this->queryMonitor in the query_explains
branch of onAfterDisconnect():
if ($this->queryMonitor && $this->params->get('query_explains') && \in_array($db->getServerType(), ['mysql', 'postgresql'], true)) {
Happy to open a PR against 6.1-dev if desired.| Labels |
Added:
No Code Attached Yet
bug
|
||
| Status | New | ⇒ | Closed |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-04-15 15:08:23 |
| Closed_By | ⇒ | Fedik |
489 - if ($this->params->get('query_explains') && \in_array($db->getServerType(), ['mysql', 'postgresql'], true)) {
489 + if ($this->queryMonitor && $this->params->get('query_explains') && \in_array($db->getServerType(), ['mysql', 'postgresql'],
+ true)) {