From 0520607cdb3e5d7347ed08bfe8c2a4dfaeefee15 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Tue, 24 Jun 2003 16:49:42 +0000 Subject: [PATCH] - Fix de un bug de la funcion que valida las fechas. Si le llegaban los datos vacios ('') la tomaba como no valida --- lib/MECON/HTML/QuickForm/mdate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MECON/HTML/QuickForm/mdate.php b/lib/MECON/HTML/QuickForm/mdate.php index 2697234..b1fb915 100644 --- a/lib/MECON/HTML/QuickForm/mdate.php +++ b/lib/MECON/HTML/QuickForm/mdate.php @@ -119,8 +119,8 @@ class HTML_QuickForm_mdate extends HTML_QuickForm_date function validate($valor, $nombre, $formato = '') { $str = sprintf ("%4d-%02d-%02d",$valor['Y'],$valor['F'],$valor['d']); - - if ($valor['Y'] != '--' && $valor['d'] != '--' && $valor['F'] != '--') { + + if (($valor['Y'] != '--' && $valor['d'] != '--' && $valor['F'] != '--') && ($valor['Y'] != '' && $valor['d'] != '' && $valor['F'] != '')) { return Validate::date($str, array('format' => '%Y-%m-%d')); } return true; -- 2.43.0