From 424250196a65b48919de50b2a3327f67c076e0d3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 1 Nov 2008 19:51:06 +0000 Subject: - Patch #279516 by c960657: removed many PHP4-isms. Great patch. --- modules/node/node.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/node/node.module') 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.')); } } -- cgit v1.2.3