When using this module on PHP 7 the Drupal watchdog is filled with warnings: Failed to write session data (user). Please verify that the current setting of session.save_path is correctorrect etc.

From this issue in Drupal core: https://www.drupal.org/project/drupal/issues/2761285 I learned that php7 is more strict and requires a custom session handler to return a boolean value.

My proposed solution

Change line 16 of de Backend/Default.php from

    if ($this->isWriteEnabled()) {
        $this->storage->write($sessionId, $serializedData);
    }

to this:

    if ($this->isWriteEnabled()) {
         return $this->storage->write($sessionId, $serializedData);
    }

And the warnings are fixed.

I added a patch with my proposed solution for the latest release.

Comments

wannesderoy created an issue. See original summary.

pounard credited Pierre.R.

pounard’s picture

Thanks a lot, 7.x-1.0-rc3 release coming in soon.

pounard’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.