Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Session destroy error for SaveHandler/DbTableGateway on regenerateId() #42

Closed
robob4him opened this issue May 23, 2016 · 0 comments
Closed

Comments

@robob4him
Copy link

robob4him commented May 23, 2016

I've been getting an error: session_regenerate_id(): Session object destruction failed. ID: user (path: )

I can replicate by adding the following test to test/SaveHandler/DbTableGatewayTest.php:

    /**
     * @runInSeparateProcess
     */
    public function testRegenerateWithSessionManager()
    {
        $sm = new \Zend\Session\SessionManager(null, null, new DbTableGateway($this->tableGateway, $this->options));
        $sm->start();
        $sm->regenerateId();
    }
PHPUnit 5.2.10 by Sebastian Bergmann and contributors.

...E                                                               4 / 4 (100%)

Time: 1.7 seconds, Memory: 6.00MB

There was 1 error:

1) ZendTest\Session\SaveHandler\DbTableGatewayTest::testRegenerateWithSessionMan
ager
session_regenerate_id(): Session object destruction failed.  ID: user (path: )

C:\.home\.workspace\zend-session\src\SessionManager.php:323
C:\.home\.workspace\zend-session\test\SaveHandler\DbTableGatewayTest.php:133

I'm still trying to track down what changed since 2.5 but I do know DbTableGateway is being called to delete a record it hasn't created yet, and because it returns zero (the number of records it removed in the delete) the save_handler call fails. Apparently this hadn't happened back in 2.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant