Zend Framework

Notice: Undefined index: X ...Namespace.php on line 315

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.6.2
  • Fix Version/s: None
  • Component/s: Zend_Session
  • Labels:
    None
  • Fix Version Priority:
    Should Have

Description

Not checking if a namespace is set in "apply" notice causes notice. This also affects applySet method.

Suggest that, instead of adding isset checks everywhere, a reference of the session var be stored and called upon instead throughout.

Activity

Hide
Ralph Schindler added a comment -

Is this still an issue for you? What is your reproduction code? I think this was an issue with PHP 5.1, but not with PHP 5.2.4+

Show
Ralph Schindler added a comment - Is this still an issue for you? What is your reproduction code? I think this was an issue with PHP 5.1, but not with PHP 5.2.4+
Hide
Brandon Mueller added a comment -

Still an issue as ZF 1.11.10 w/ php 5.3.
Code to reproduce:

$ns = new Zend_Session_Namespace();
$ns->applySet($callback);

If you are starting with fresh session, the error will raise every time.

Suggested code to fix the issue:

any place you have:

$arg_list[0] = $_SESSION[$this->_namespace];

should be something like this:

$arg_list[0] = isset($_SESSION[$this->_namespace]) ? $_SESSION[$this->_namespace] : NULL;

Show
Brandon Mueller added a comment - Still an issue as ZF 1.11.10 w/ php 5.3. Code to reproduce: $ns = new Zend_Session_Namespace(); $ns->applySet($callback); If you are starting with fresh session, the error will raise every time. Suggested code to fix the issue: any place you have: $arg_list[0] = $_SESSION[$this->_namespace]; should be something like this: $arg_list[0] = isset($_SESSION[$this->_namespace]) ? $_SESSION[$this->_namespace] : NULL;

People

Vote (0)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: