LSformRule :: date : Fix mktime return check
authorBenjamin Renard <brenard@easter-eggs.com>
Wed, 2 Sep 2015 08:44:00 +0000 (10:44 +0200)
committerBenjamin Renard <brenard@easter-eggs.com>
Wed, 2 Sep 2015 08:44:00 +0000 (10:44 +0200)
public_html/includes/class/class.LSformRule_date.php

index f780757..f7e3da8 100644 (file)
@@ -44,7 +44,7 @@ class LSformRule_date extends LSformRule {
     $date = strptime($value,$options['format']);
     if(is_array($date)) {
       $res = mktime($date['tm_hour'],$date['tm_min'],$date['tm_sec'],$date['tm_mon']+1,$date['tm_mday'],$date['tm_year']+1900);
-      if ((is_int($res)) && ($res > -1)) {
+      if ((is_int($res)) && ($res != -1) && ($res !== False)) {
         return true;
       }
     }