Zend Framework

Zend_Validate_Date wrong result with float => return TRUE

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.7.0
  • Fix Version/s: 1.7.1
  • Component/s: Zend_Date, Zend_Validate
  • Labels:
    None

Description

The Date validator return TRUE with some float values:

 
$validator = new Zend_Validate_Date('YYYY-MM-DD');
        $result = $validator->isValid($value);
        
        if (!$result) {
            $this->_error(self::NOT_VALID_DATE);
            return $result;
        }
        
        return $result;

...->isValid(-1.10) return TRUE
...->isValid(-3.0005) return TRUE

Activity

Hide
Satoru Yoshida added a comment -

I think it is a issue how to check type of parameters. It is similar to ZF-4352

Show
Satoru Yoshida added a comment - I think it is a issue how to check type of parameters. It is similar to ZF-4352
Hide
Thomas Weidner added a comment -

@Satoru:

I don't know how you come to the idea that this issue is related to ZF-4352.
Wether Alpha nor Alnum filters are used by this filter.
And the value is also not casted.

There is no relationship between this two issues.

Show
Thomas Weidner added a comment - @Satoru: I don't know how you come to the idea that this issue is related to ZF-4352. Wether Alpha nor Alnum filters are used by this filter. And the value is also not casted. There is no relationship between this two issues.
Hide
Thomas Weidner added a comment -

Fixed with r12910

Show
Thomas Weidner added a comment - Fixed with r12910

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: