If session cannot be started an exception should be thrown

9 views
Skip to first unread message

Wojtek Gancarczyk

unread,
Oct 30, 2012, 4:46:53 PM10/30/12
to phalcon-...@googlegroups.com
Check out this discussion about session in test environment:


As it doesn't really apply for system under test, I think it would make sense if \Phalcon\Session::start() would throw an exception, if session cannot be started. The reason for that is that many parts of common web applications rely on session and if it wasn't started properly it is basically useless and might break some components that rely on it.

What do you think?

Andres-Gutierrez

unread,
Oct 30, 2012, 4:48:26 PM10/30/12
to Wojtek Gancarczyk, phalcon-...@googlegroups.com
A $this->assertTrue($session->start()) will offer the same behavior

2012/10/30 Wojtek Gancarczyk <ganca...@gmail.com>

--
 
 

Wojtek Gancarczyk

unread,
Oct 30, 2012, 5:14:21 PM10/30/12
to phalcon-...@googlegroups.com, Wojtek Gancarczyk, andres.g...@phalconphp.com
I was rather talking about the application. Zend Framework throws an exception when the headers have been already sent. This is mostly the case, when some warnings or notices have been sent to the browser before the actual session was started. I was just trying to reproduce it in phalcon but it seems that even with output_buffering = 4096 headers won't be sent and therefore session will always be started.

Forget about this one then...
Reply all
Reply to author
Forward
0 new messages