From 9f65a05d470ee9e2ca797ce26f09acb4dcef9b5c Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 14 Jan 2016 14:51:08 +0100 Subject: [PATCH] Loosen the the test for the date format (Bug #14130). Theoretically it might have been intended to explicitly pass an empty string (as opposed to a null value) as the date format. But this doesn't make sense because that would generate a form field that never has a result value. Beside that we already *do* catch an empty value, even if it's a strict null check. --- framework/Form/lib/Horde/Form/Type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/Form/lib/Horde/Form/Type.php b/framework/Form/lib/Horde/Form/Type.php index e7dde7d33c7..efc0b62c762 100644 --- a/framework/Form/lib/Horde/Form/Type.php +++ b/framework/Form/lib/Horde/Form/Type.php @@ -3021,7 +3021,7 @@ function _validateAndFormat($value, &$var) return $var->getDefault(); } else { $date = $this->getDateOb($value); - if ($this->_format_in === null) { + if (!strlen($this->_format_in)) { return $date->timestamp(); } else { return $date->strftime($this->_format_in);