We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Session set 0 value return NULL, is a bug?

Hi, i do:

 $this->session->set(self::BTS_SESSION_USER_ID,$o_user->getIduser());

where $o_user->getIduser(), could be, 0,1,2,3,4.....1000

when i try to save in session: 0 value, and do:

var_dump($this->session->get(self::BTS_SESSION_USER_ID));

the response is: NULL

Why does not save 0 value!... this is a bug??



34.6k
Accepted
answer

Hugo, this is fixed in the 2.0.x branch

Thanks!.. i will checkout branch 2.0.x ..and try!

@andresgutierrez works on branch 2.0.x!