ZF-11878: AllowWhiteSpace options inconsistency in Zend_Filter_Alnum and Zend_Validate_Alnum

Description

Both Zend_Filter_Alnum and Zend_Validate_Alnum can accept an array of options during initialisation. The only supported option is whether to allow white spaces or not. However, they expect the option to be named differently.

Zend_Validate_Alnum checks for 'allowWhiteSpace':


...
if (array_key_exists('allowWhiteSpace', $allowWhiteSpace)) {
                $allowWhiteSpace = $allowWhiteSpace['allowWhiteSpace'];
...

Zend_Filter_Alnum expects 'allowwhitespace':


...
 if (array_key_exists('allowwhitespace', $allowWhiteSpace)) {
                $allowWhiteSpace = $allowWhiteSpace['allowwhitespace'];
...

Shouldn't the options have the same case (lowercase or camelCase)? The same is true for Zend_Validate_Alpha/Zend_Filter_Alpha

Comments

Fixed in ZF2 with GH-590