Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.5.1
-
Fix Version/s: 1.8.0
-
Component/s: Zend_Filter_Input
-
Labels:None
-
Fix Version Priority:Nice to Have
Description
When using the Zend_Filter_Input component it is usually in preparation for database insert/update queries. Sometimes it is necessary to pass a NULL value in such a query (for example, to reset a previously set field that is NULL by default). Unfortunately the default escaper, htmlentities, converts NULL values into empty strings which prevents such data from passing a Zend_Filter_Input process.
This could be seen as a PHP bug (why is null converted to empty string?) but as it stands it should be possible to pass null values through a Zend_Filter_Input.
I've created a temporary patch in my local build of the framework (1.5.1)
Zend_Filter_Input.php, line 349:
protected function _escapeRecursive($data) { if(is_null($data)){ return $data; } .... }
Please evaluate and categorize/assign as necessary.