Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
[#2633] Fix test failure
Browse files Browse the repository at this point in the history
- Fix in #2633, while mostly correct, let $date with bool false value
  continue as valid, which it should not. Added another conditional,
  which ensures reported issue still is fixed, while keeping original
  behavior.
  • Loading branch information
weierophinney committed Oct 3, 2012
1 parent 99da700 commit 8392dae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions library/Zend/Validator/Date.php
Expand Up @@ -132,6 +132,10 @@ public function isValid($value)
$this->error(self::INVALID_DATE);
return false;
}
if ($date === false) {
$this->error(self::INVALID_DATE);
return false;
}
} else {
if (is_array($value)) {
$value = implode('-', $value);
Expand Down

0 comments on commit 8392dae

Please sign in to comment.