From e7f541396715ee2895abcf73044b91ae9b746201 Mon Sep 17 00:00:00 2001 From: xXx-caillou-xXx Date: Wed, 20 Dec 2017 18:09:53 +0100 Subject: Better parsing of the rules Thanks to this huge commit from @xXx-caillou-xXx, we can now write amazingly flexible rules.--- ...led_functions_param_array_several_levels_int.phpt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/tests/disabled_functions_param_array_several_levels_int.phpt (limited to 'src/tests/disabled_functions_param_array_several_levels_int.phpt') diff --git a/src/tests/disabled_functions_param_array_several_levels_int.phpt b/src/tests/disabled_functions_param_array_several_levels_int.phpt new file mode 100644 index 0000000..2e546f4 --- /dev/null +++ b/src/tests/disabled_functions_param_array_several_levels_int.phpt @@ -0,0 +1,20 @@ +--TEST-- +Disable functions - match on an array value buried in several levels +--SKIPIF-- + +--INI-- +sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini +--FILE-- +Array("pof"=>"pif", "foo"=>Array("lol"=>"bbb")), "a"=>"cccc"); +foo($a); + +$a=Array("test2"=>Array("foo"=>Array("123"=>"aaa")), "a"=>"dddd"); +foo($a); +?> +--EXPECTF-- +cccc +[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/tests/disabled_functions_param_array_several_levels_int.php:3 has been disabled, because its argument '$arr' content (ARRAY) matched the rule '4'. -- cgit v1.3