diff options
Diffstat (limited to 'src/tests/disable_function/disabled_functions_param_array_deref.phpt')
| -rw-r--r-- | src/tests/disable_function/disabled_functions_param_array_deref.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tests/disable_function/disabled_functions_param_array_deref.phpt b/src/tests/disable_function/disabled_functions_param_array_deref.phpt new file mode 100644 index 0000000..3305965 --- /dev/null +++ b/src/tests/disable_function/disabled_functions_param_array_deref.phpt | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | --TEST-- | ||
| 2 | Disable functions | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php if (!extension_loaded("snuffleupagus")) die "skip"; ?> | ||
| 5 | --INI-- | ||
| 6 | sp.configuration_file={PWD}/config/config_disabled_functions_param_array.ini | ||
| 7 | --FILE-- | ||
| 8 | <?php | ||
| 9 | function foo($arr) { | ||
| 10 | echo $arr["a"]."\n"; | ||
| 11 | } | ||
| 12 | |||
| 13 | $a=Array("bla"=>"aaa", "a"=>"eee" ); | ||
| 14 | foo($a); | ||
| 15 | |||
| 16 | $a=Array("bla"=>"aaa", "a"=>"abcdef" ); | ||
| 17 | foo($a); | ||
| 18 | |||
| 19 | $a=Array("bla"=>"abcdef", "not_bla"=>"134"); | ||
| 20 | foo($a); | ||
| 21 | ?> | ||
| 22 | --EXPECTF-- | ||
| 23 | eee | ||
| 24 | abcdef | ||
| 25 | |||
| 26 | Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'foo', because its argument '$arr' content (abcdef) matched the rule '2' in %a/disabled_functions_param_array_deref.php on line 3 \ No newline at end of file | ||
