ZF-6953: Identical should allow empty strings as valid token
Description
Currently Zend_Validate_Identical use empty() to test, if there is a "MISSING_TOKEN" error, but this means, that an empty string would also be a "missing token". I think an empty string should be a valid token, because if i test an empty string against an empty string-token it is valid in my opinion.
I use this validator for password confirmation, but when i edit a user an empty password is allowed as it means "no change". At the other hand there is the NotEmpty-validator which will validate the case, that its not allowed to be empty. It seems confusing, that two identical (empty) strings are not compareable this way.
Comments
Posted by Sebastian Krebs (kingcrunch) on 2009-06-08T05:34:53.000+0000
A possible solution:
or more simple (as setToken() cast to string anyway)
Posted by Thomas Weidner (thomas) on 2009-06-25T12:50:35.000+0000
Implemented with r16289