Zend Framework

Zend_Session is too aggressive about catching errors during session_start

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Zend_Session
  • Labels:
    None

Description

Zend_Session installs an error handler to catch any errors triggered by session_start, and then rethrows them as an exception if it caught any. However, it catches all errors (mask set to E_ALL)

This causes problems when session_start writes NOTICE level errors which probably do not signify a session_start problem.

I'd propose changing the set_error_handler call:

set_error_handler(array('Zend_Session_Exception', 'handleSessionStartError'), E_ALL);
to
set_error_handler(array('Zend_Session_Exception', 'handleSessionStartError'), E_ALL & ~E_NOTICE);

Not sure what version this is, but the RCS tags at the top say:

  • @version $Id: Session.php 5500 2007-06-29 14:39:50Z darby $
  • @since Preview Release 0.2

Activity

Hide
Till Klampaeckel added a comment -

This is a show stopper.

Show
Till Klampaeckel added a comment - This is a show stopper.
Hide
Ralph Schindler added a comment -

Resolved as part of r15640 for ZF-3020, see the option throw_startup_exceptions- the ability to pass in a integer (error level)

Show
Ralph Schindler added a comment - Resolved as part of r15640 for ZF-3020, see the option throw_startup_exceptions- the ability to pass in a integer (error level)

People

Vote (2)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: