Issues

ZF-11277: The private function _processStartupMetadataGlobal in zend_session.php cannot unset $_SESSION['__ZF'] thoroughly

Issue Type: Bug Created: 2011-04-11T04:14:35.000+0000 Last Updated: 2011-05-03T14:56:25.000+0000 Status: Resolved Fix version(s): - 1.11.6 (05/May/11)

Reporter: Tommas Yuan (tommas) Assignee: Adam Lundrigan (adamlundrigan) Tags: - Zend_Session

Related issues: Attachments: - ZF-11277.patch

Description

<pre class="highlight">
private static function _processStartupMetadataGlobal()
 {
 // process global metadata
 if (isset($_SESSION['__ZF'])) {

 // expire globally expired values
 foreach ($_SESSION['__ZF'] as $namespace => $namespace_metadata) {

 ........
 ........

 }

 if (isset($namespace) && empty($_SESSION['__ZF'][$namespace])) {
 unset($_SESSION['__ZF'][$namespace]);
 }
 }

 if (isset($_SESSION['__ZF']) && empty($_SESSION['__ZF'])) {
 unset($_SESSION['__ZF']);
 }
 }

If there are two namspaces to store my data, and both of them should be expire at this time, the codes above shows that only the last namespace can be unset, and the previous one cannot.

Comments

Posted by Adam Lundrigan (adamlundrigan) on 2011-04-29T17:29:44.000+0000

I've moved the block of code in question:

<pre class="highlight">
if (isset($namespace) && empty($_SESSION['__ZF'][$namespace])) {
    unset($_SESSION['__ZF'][$namespace]);
}

inside the foreach loop where it belongs.

Posted by Adam Lundrigan (adamlundrigan) on 2011-04-29T17:32:25.000+0000

Fixed in trunk r23891

Posted by Satoru Yoshida (satoruyoshida) on 2011-05-03T09:47:08.000+0000

Hello, Adam. I will push [solve] button as proxy for You. If You want to release at next mini, You can merge this commit fron trunk to 1.11 branch.

Thanks.

Posted by Ralph Schindler (ralph) on 2011-05-03T14:19:18.000+0000

Not merged yet, will merge shortly.

Posted by Ralph Schindler (ralph) on 2011-05-03T14:56:25.000+0000

Fixed in release branch 1.11 in r23955

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts