pajoye Wed Apr 4 20:51:42 2007 UTC
Modified files:
/php-src/ext/filter filter.c
Log:
- MFB: #40947, allow a single filter as argument for filter_var_arra
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.85&r2=1.86&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.85 php-src/ext/filter/filter.c:1.86
--- php-src/ext/filter/filter.c:1.85 Mon Jan 1 09:29:23 2007
+++ php-src/ext/filter/filter.c Wed Apr 4 20:51:42 2007
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.85 2007/01/01 09:29:23 sebastian Exp $ */
+/* $Id: filter.c,v 1.86 2007/04/04 20:51:42 pajoye Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -275,7 +275,7 @@
{
php_info_print_table_start();
php_info_print_table_row( 2, "Input Validation and Filtering",
"enabled" );
- php_info_print_table_row( 2, "Revision", "$Revision: 1.85 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.86 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
@@ -784,8 +784,10 @@
return;
}
- if (op && ( (Z_TYPE_PP(op) == IS_LONG &&
!PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op)))
- || Z_TYPE_PP(op) != IS_ARRAY)) {
+ if (op
+ && (Z_TYPE_PP(op) != IS_ARRAY)
+ && (Z_TYPE_PP(op) == IS_LONG &&
!PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op)))
+ ) {
RETURN_FALSE;
}
@@ -823,8 +825,10 @@
return;
}
- if (op && ( (Z_TYPE_PP(op) == IS_LONG &&
!PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op)))
- || Z_TYPE_PP(op) != IS_ARRAY)) {
+ if (op
+ && (Z_TYPE_PP(op) != IS_ARRAY)
+ && (Z_TYPE_PP(op) == IS_LONG &&
!PHP_FILTER_ID_EXISTS(Z_LVAL_PP(op)))
+ ) {
RETURN_FALSE;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php