From 8182226dd5fa606f1fcf0b6ad91ba02ac32195a6 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 3 Nov 2005 23:57:04 +0000 Subject: [PATCH] fix for PHP 5.1, yet another arbitrary change of return value --- includes/SpecialBlockip.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 41ebef58e5..0a9d2bac6d 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -191,10 +191,10 @@ class IPBlockForm { if ( $expirestr == 'infinite' || $expirestr == 'indefinite' ) { $expiry = ''; } else { - # Convert GNU-style date, returns -1 on error + # Convert GNU-style date, on error returns -1 for PHP <5.1 and false for PHP >=5.1 $expiry = strtotime( $expirestr ); - if ( $expiry < 0 ) { + if ( $expiry < 0 || $expiry === false ) { $this->showForm( wfMsg( 'ipb_expiry_invalid' ) ); return; } -- 2.20.1