Issue Details (XML | Word | Printable)

Key: ZF-6711
Type: Docs:  Improvement Docs: Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Veremyev
Reporter: Alexander Veremyev
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

Zend_Filter_Input skips ALLOW_EMPTY metacommand processing if rule refers several fields.

Created: 18/May/09 07:34 AM   Updated: 21/May/09 05:30 AM   Resolved: 21/May/09 05:30 AM
Component/s: Zend_Filter_Input
Affects Version/s: None
Fix Version/s: 1.8.2

Time Tracking:
Not Specified

Issue Links:
Related
 

Language: English


 Description  « Hide

It uses:

if (count((array) $validatorRule[self::FIELDS]) > 1) {
    if (!$validatorRule[self::VALIDATOR_CHAIN]->isValid($data)) {
        $this->_invalidMessages[$validatorRule[self::RULE]] = $validatorRule[self::VALIDATOR_CHAIN]->getMessages();
        $this->_invalidErrors[$validatorRule[self::RULE]] = $validatorRule[self::VALIDATOR_CHAIN]->getErrors();
        return;
    }
} else {
...

construction.

if (count((array) $validatorRule[self::FIELDS]) == 1) {
...

actually should be used here.

But this code also skips ALLOW_EMPTY metacommand processing for this special case. So it should be removed at all.



Alexander Veremyev added a comment - 18/May/09 07:55 AM

Fixed.


Alexander Veremyev added a comment - 21/May/09 02:18 AM

Issue is reopened.

It's correct to process several fields as a special case. But it still needs ALLOW_EMPTY metacommand processing.


Alexander Veremyev added a comment - 21/May/09 05:30 AM

Fixed.