diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-12-15 16:02:50 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-12-15 16:02:50 +0000 |
commit | 5accfa08f52a31da74715c38a1d7a12793fa33c7 (patch) | |
tree | c4608737b446716a418a40f0ed21722195fedebd /modules/comment | |
parent | 264f7d5667e83cf07c38b91cfd170e57f845a5f2 (diff) | |
download | brdo-5accfa08f52a31da74715c38a1d7a12793fa33c7.tar.gz brdo-5accfa08f52a31da74715c38a1d7a12793fa33c7.tar.bz2 |
- Patch #41133 by DriesK: as of PHP 5.1.0, strtotime() returns FALSE on failure instead of -1.
Changed code to be compatible with all versions.
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.module | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index c4dac7d36..b4a5cdbd4 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -517,7 +517,8 @@ function comment_validate(&$edit) { } else { $date = isset($edit['date']) ? $edit['date'] : 'now'; - if (strtotime($date) != -1) { + // As of PHP 5.1.0, strtotime returns FALSE upon failure instead of -1. + if (strtotime($date) > 0) { $edit['timestamp'] = strtotime($date); } else { |