Totally Zenned
- Join Date:
- Nov 2003
- Posts:
- 1,878
- Plugin Contributions:
- 5
[Not a bug] typo in sessions.php?
It's a minor error, and does not cause any problems as it is, but I imagine it may lead to a real bug if the code is updated by someone who is not aware of this typo.
In includes/functions/sessions.php:
if (!$SESS_LIFE = (SESSION_TIMEOUT_ADMIN > 900 ? 900 : SESSION_TIMEOUT_ADMIN)) {
$SESS_LIFE = (SESSION_TIMEOUT_ADMIN > 900 ? 900 : SESSION_TIMEOUT_ADMIN);
}
```(Under normal circumstances the 1st line is always executed, which sets $SESS_LIFE on every page call. The 2nd line will only be executed if SESSION_TIMEOUT_ADMIN is not true...)
Should be:
if (!$SESS_LIFE == (SESSION_TIMEOUT_ADMIN > 900 ? 900 : SESSION_TIMEOUT_ADMIN)) {
$SESS_LIFE = (SESSION_TIMEOUT_ADMIN > 900 ? 900 : SESSION_TIMEOUT_ADMIN);
}
(note: similar error in several 1.3.x versions)