php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #53037
Patch fix-bug-try revision 2011-03-28 22:17 UTC by jinmoku at hotmail dot com

Patch fix-bug-try for Filter related Bug #53037

Patch version 2011-03-28 22:17 UTC

Return to Bug #53037 | Download this patch
Patch Revisions:

Developer: jinmoku@hotmail.com

Index: filter.c
===================================================================
--- filter.c	(revision 309799)
+++ filter.c	(working copy)
@@ -662,6 +662,10 @@
 	}
 
 	php_zval_filter(filtered, filter, filter_flags, options, charset, copy TSRMLS_CC);
+	if (filter_flags & FILTER_FLAG_EMPTY_STRING_NULL && Z_TYPE_PP(filtered) == IS_STRING && Z_STRLEN_PP(filtered) == 0) {
+		zval_dtor(*filtered);		
+		ZVAL_NULL(*filtered);
+	}
 	if (filter_flags & FILTER_FORCE_ARRAY) {
 		zval *tmp;
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC