
17 Aug
2009
17 Aug
'09
8:19 a.m.
On 13.08.2009 21:57, Zeeshan M. wrote:
Also, I found a minor bug in my code. Extracted db value for LoginCookieValidity turns out to be non-INT type by default.
all Variables from $_REQUEST (_COOKIE, _GET, _POST) are strings
So, if you have tried running the script, you may have realized that your session breaks in less than expected time. Multiplying db value by 1 should do the trick.
use $myVar = (int) $myVar; or $myVar = intval($myVar); -- Sebastian Mendel