diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-03-18 02:51:43 +0100 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-03-18 02:51:43 +0100 |
| commit | c24408f6eda8347bba17c83e027f118091986488 (patch) | |
| tree | 9327baa5aedd09312f690455b809a5fce9dc2693 /phpBB/memberlist.php | |
| parent | 65580f790146b6932372d7aa85903b753f31510e (diff) | |
| download | forums-c24408f6eda8347bba17c83e027f118091986488.tar forums-c24408f6eda8347bba17c83e027f118091986488.tar.gz forums-c24408f6eda8347bba17c83e027f118091986488.tar.bz2 forums-c24408f6eda8347bba17c83e027f118091986488.tar.xz forums-c24408f6eda8347bba17c83e027f118091986488.zip | |
[ticket/10021] Add comment explaining why we can check -1 as an error value.
PHPBB3-10021
Diffstat (limited to 'phpBB/memberlist.php')
| -rw-r--r-- | phpBB/memberlist.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index b1b9e87422..599cd0b3e7 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1072,6 +1072,11 @@ switch ($mode) if (isset($find_key_match[$joined_select]) && sizeof($joined) == 3) { + // Before PHP 5.1 an error value -1 can be returned instead of false. + // Theoretically gmmktime() can also legitimately return -1 as an actual timestamp. + // But since we do not pass the $second parameter to gmmktime(), + // an actual unix timestamp -1 cannot be returned in this case. + // Thus we can check whether it is -1 and treat -1 as an error. $joined_time = gmmktime(0, 0, 0, (int) $joined[1], (int) $joined[2], (int) $joined[0]); if ($joined_time !== false && $joined_time !== -1) |
