Issues

ZF-6072: $_singleInstances are not cleaned up with namespaceUnset()

Issue Type: Bug Created: 2009-03-19T17:08:27.000+0000 Last Updated: 2009-05-19T11:23:30.000+0000 Status: Resolved Fix version(s): - 1.8.2 (27/May/09)

Reporter: Till Klampaeckel (till) Assignee: Ralph Schindler (ralph) Tags: - Zend_Session

Related issues: Attachments:

Description

This is in my bootstrap (among other things):

<pre class="highlight">
class App
{
  public function __construct($env)
  {
  }

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

My test case:

<pre class="highlight">
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(): {quote} 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. {quote}

Comments

Posted by Ralph Schindler (ralph) on 2009-05-19T11:23:30.000+0000

Fixed in r15641

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