Index: tests/Zend/Session/SessionTest.php =================================================================== --- tests/Zend/Session/SessionTest.php (revision 23320) +++ tests/Zend/Session/SessionTest.php (working copy) @@ -872,6 +872,28 @@ } /** + * @group ZF-7196 + */ + public function testUnsettingNamespaceKeyWithoutUnsettingCompleteExpirationData() + { + $namespace = new Zend_Session_Namespace('DummyNamespace'); + + $namespace->foo = 23; + $namespace->bar = 42; + + $namespace->setExpirationHops(1); + + $sessionId = session_id(); + + session_write_close(); + exec($this->_script . ' expireAll ' . $sessionId . ' DummyNamespace ZF-7196', $result, $returnValue); + session_start(); + + $result = $this->sortResult($result); + $this->assertSame($result, ';bar === 42'); + } + + /** * test expiration of namespace variables by hops; expect expiration of specified keys in the proper number of hops * * @return void Index: tests/Zend/Session/SessionTestHelper.php =================================================================== --- tests/Zend/Session/SessionTestHelper.php (revision 23320) +++ tests/Zend/Session/SessionTestHelper.php (working copy) @@ -94,6 +94,9 @@ else { $s = new Zend_Session_Namespace(); } + if (isset($args[2]) && ($args[2] == 'ZF-7196')) { + unset($s->foo); + } $result = ''; foreach ($s->getIterator() as $key => $val) { $result .= "$key === $val;"; Index: library/Zend/Session/Abstract.php =================================================================== --- library/Zend/Session/Abstract.php (revision 23320) +++ library/Zend/Session/Abstract.php (working copy) @@ -120,7 +120,7 @@ unset(self::$_expiringData[$namespace]); } else { unset($_SESSION[$namespace][$name]); - unset(self::$_expiringData[$namespace]); + unset(self::$_expiringData[$namespace][$name]); } // if we remove the last value, remove namespace.