Thomas Weidner’s Blog: New Zend_Validate_NotEmpty implementation

Thomas Weidner contributed small but very important change to Zend_Validate_NotEmpty – compatibility with PHP’s empty() function.

Today I added a completly new implementation for the “not empty” validator.Zend_Validate_NotEmpty worked in past only the “framework” way. It detected whitespaces as empty and excluded ‘0′. This collidates with how PHP’s empty() works.

It looks like not much, but should make use of this validator more natural and will definitely limit a number of stupid bugs in everyone’s applications (remember PHP4 and PHP5 inconsistencies?).