cvs: php-src(PHP_5_2) /ext/filter filter.c
| From: | Pierre-Alain Joye | Date: | Wed, 04 Apr 2007 20:50:26 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/filter filter.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-43727@lists.php.net to get a copy of this message | ||
pajoye Wed Apr 4 20:50:26 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/filter filter.c
Log:
- #40947, allow a single filter as argument for filter_var_array
http://cvs.php.net/viewvc.cgi/php-src/ext/filter/filter.c?r1=1.52.2.38&r2=1.52.2.39&diff_format=u
Index: php-src/ext/filter/filter.c
diff -u php-src/ext/filter/filter.c:1.52.2.38 php-src/ext/filter/filter.c:1.52.2.39
--- php-src/ext/filter/filter.c:1.52.2.38 Mon Jan 1 09:36:00 2007
+++ php-src/ext/filter/filter.c Wed Apr 4 20:50:26 2007
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: filter.c,v 1.52.2.38 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: filter.c,v 1.52.2.39 2007/04/04 20:50:26 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.52.2.38 $");
+ php_info_print_table_row( 2, "Revision", "$Revision: 1.52.2.39 $");
php_info_print_table_end();
DISPLAY_INI_ENTRIES();
@@ -776,8 +776,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;
}
@@ -815,8 +817,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;
}