Skip to content

Commit

Permalink
Loosen the the test for the date format (Bug #14130).
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yunosh committed Jan 14, 2016
1 parent 23a0707 commit 9f65a05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/Form/lib/Horde/Form/Type.php
Expand Up @@ -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);
Expand Down

0 comments on commit 9f65a05

Please sign in to comment.