Skip to content

Commit

Permalink
Uncaught Error: Call to a member function getId() on bool in /.../inc…
Browse files Browse the repository at this point in the history
…lude/class.session.php:314

To prevent following error:
PHP Fatal error: Uncaught Error: Call to a member function getId() on bool in /.../include/class.session.php:314

Logged back trace:

PHP Fatal error: Uncaught Error: Call to a member function getId() on bool in /.../include/class.session.php:314
Stack trace:
#0 /.../include/class.session.php(336): osTicket\\Session\\AbstractSessionStorageBackend->getRecord()
osTicket#1 /.../include/class.session.php(281): osTicket\\Session\\AbstractSessionStorageBackend->update()
osTicket#2 [internal function]: osTicket\\Session\\AbstractSessionHandler->write()
osTicket#3 [internal function]: session_write_close()
  • Loading branch information
JensEB authored Feb 3, 2023
1 parent 6126363 commit af83896
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/class.session.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ protected function onEvent($event) {

public function getRecord($id, $autocreate = false) {
if (!isset($this->record)
|| !is_object($this->record)
// Mismatch here means new session id
|| strcmp($id, $this->record->getId()))
$this->record = static::lookupRecord($id, $autocreate, $this);
Expand Down

0 comments on commit af83896

Please sign in to comment.