summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-11-01 19:51:06 +0000
committerDries Buytaert <dries@buytaert.net>2008-11-01 19:51:06 +0000
commit424250196a65b48919de50b2a3327f67c076e0d3 (patch)
tree83b9cae1c024bd391d15f8faeee7595985fca4d7 /modules/node/node.module
parent4a6243aff27d5f26189e0e9eff2039fe0cdbb754 (diff)
downloadbrdo-424250196a65b48919de50b2a3327f67c076e0d3.tar.gz
brdo-424250196a65b48919de50b2a3327f67c076e0d3.tar.bz2
- Patch #279516 by c960657: removed many PHP4-isms. Great patch.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 2101c671e..5c4bc884a 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -842,8 +842,8 @@ function node_validate($node, $form = array()) {
form_set_error('name', t('The username %name does not exist.', array('%name' => $node->name)));
}
- // Validate the "authored on" field. As of PHP 5.1.0, strtotime returns FALSE instead of -1 upon failure.
- if (!empty($node->date) && strtotime($node->date) <= 0) {
+ // Validate the "authored on" field.
+ if (!empty($node->date) && strtotime($node->date) === FALSE) {
form_set_error('date', t('You have to specify a valid date.'));
}
}