From 66a2c528fe29c1af2c98e67acaa4b900cd57496d Mon Sep 17 00:00:00 2001 From: Jeff Welch Date: Mon, 9 Mar 2015 03:54:19 -0400 Subject: Fix #69202: FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used. --- ext/filter/sanitizing_filters.c | 2 +- ext/filter/tests/bug69202.phpt | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 ext/filter/tests/bug69202.phpt (limited to 'ext') diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index 157102f4e5..975e425cf4 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -113,7 +113,7 @@ static void php_filter_strip(zval *value, long flags) int i, c; /* Optimization for if no strip flags are set */ - if (! ((flags & FILTER_FLAG_STRIP_LOW) || (flags & FILTER_FLAG_STRIP_HIGH)) ) { + if (!(flags & (FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK))) { return; } diff --git a/ext/filter/tests/bug69202.phpt b/ext/filter/tests/bug69202.phpt new file mode 100644 index 0000000000..992298611f --- /dev/null +++ b/ext/filter/tests/bug69202.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #69202 (FILTER_FLAG_STRIP_BACKTICK ignored unless other flags are used) +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(3) "abc" +string(3) "abc" +string(3) "abc" +string(9) "``a`b`c``" -- cgit v1.2.1 From 9af1383a3f9835db99e9b68eb9bcb6a0f341e339 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Mon, 9 Mar 2015 17:22:56 +0800 Subject: Revert "Fix #63486" This reverts commit f4c96ffcb565c1daa76aa58256e4df6f111f8803. --- ext/mysqli/php_mysqli_structs.h | 1 - ext/mysqli/tests/bug63486.phpt | 55 ----------------------------------------- 2 files changed, 56 deletions(-) delete mode 100644 ext/mysqli/tests/bug63486.phpt (limited to 'ext') diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index 52da163aa5..ce480d8fee 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -313,7 +313,6 @@ extern PHPAPI zend_class_entry *spl_ce_RuntimeException; mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\ efree(intern->ptr); \ intern->ptr = NULL; \ - ZVAL_NULL(*__id); \ } diff --git a/ext/mysqli/tests/bug63486.phpt b/ext/mysqli/tests/bug63486.phpt deleted file mode 100644 index 72b8663e43..0000000000 --- a/ext/mysqli/tests/bug63486.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -mysqli_free_resource() - resets the zval to NULL ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -array(1) { - [0]=> - string(1) "1" -} -object(mysqli_result)#3 (5) { - ["current_field"]=> - int(0) - ["field_count"]=> - int(1) - ["lengths"]=> - array(1) { - [0]=> - int(1) - } - ["num_rows"]=> - int(1) - ["type"]=> - int(0) -} -array(1) { - [0]=> - string(1) "1" -} -NULL -- cgit v1.2.1