cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

$session->start() warning

Open SliceOfLife opened this issue 13 years ago • 3 comments

This code from INVO example throws a default session_start() warning if PHPSESSID cookie is incorrect (contain illegal characters):

    $session = new Phalcon\Session\Adapter\Files();
    $session->start();

I think, it isn't good, because this warning is uncatchable.

SliceOfLife avatar Apr 05 '13 19:04 SliceOfLife

`You can replace $session->start(); by @session_start();

ghost avatar Apr 05 '13 19:04 ghost

Yes, I can, but this is a bad way.

Is the Phalcon\Session\Adapter\Files() class just layer over default session_* functions?

SliceOfLife avatar Apr 05 '13 20:04 SliceOfLife

Yes, it provides OO wrappers to some session_* functions also provides isolation for session data in applications that run in the same host/session

ghost avatar Apr 06 '13 07:04 ghost