summaryrefslogtreecommitdiff
path: root/src/tests/disable_function/disabled_functions_param_array_no_value.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/disable_function/disabled_functions_param_array_no_value.phpt')
-rw-r--r--src/tests/disable_function/disabled_functions_param_array_no_value.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_param_array_no_value.phpt b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt
new file mode 100644
index 0000000..dfb67a2
--- /dev/null
+++ b/src/tests/disable_function/disabled_functions_param_array_no_value.phpt
@@ -0,0 +1,23 @@
1--TEST--
2Disable functions - matching on an array's variable only
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini
7--FILE--
8<?php
9function foo($arr) {
10 echo $arr["a"]."\n";
11}
12
13$a=Array("test2"=>Array("foo"=>Array("lol"=>"bbb")), "a"=>"cccc");
14foo($a);
15
16$a=Array("test"=>"aaa", "a"=>"fff" );
17foo($a);
18
19?>
20--EXPECTF--
21cccc
22
23Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (aaa) matched the rule '3' in %a/disabled_functions_param_array_no_value.php on line 3 \ No newline at end of file