Issue Details (XML | Word | Printable)

Key: ZF-6072
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Ralph Schindler
Reporter: Till Klampaeckel
Votes: 2
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

$_singleInstances are not cleaned up with namespaceUnset()

Created: 19/Mar/09 05:08 PM   Updated: 19/May/09 11:23 AM   Resolved: 19/May/09 11:23 AM
Return to search "Fixed in 1.5.1"
Component/s: Zend_Session
Affects Version/s: 1.7.7
Fix Version/s: 1.8.2

Time Tracking:
Not Specified


 Description  « Hide

This is in my bootstrap (among other things):

class App
{
  public function __construct($env)
  {
  }

  public function start()
  {
    $foo = new Zend_Session_Namespace('foo', true);
    Zend_Registry::set('foo', $foo);
  }
}

My test case:

public function setUp()
{
  $boostrap = new App('testing');
  $this->bootstrap = array($bootstrap, 'start');
}

public function testIfIhaveLostMyFckingMind()
{
  // whatever here
}

public function testOHaiKthxBai()
{
  // something else
}

After I ran my test, Zend_Session::namespaceIsset('foo') reports "false" (test in tearDown() etc.) – so there should be no issue re-creating (= re-calling the bootstrap). But there is. Imho, the fix would be that Zend_Session::namespaceUnset() also cleans up in $_singleInstances.

This is the exception I get when it enters testOHaiKthxBai():

Zend_Session_Exception: A session namespace object already exists for this namespace ('foo'), and no additional accessors (session namespace objects) for this namespace are permitted.



Ralph Schindler added a comment - 19/May/09 11:23 AM

Fixed in r15641