diff --git a/src/sp_execute.c b/src/sp_execute.c index fb4a313..6345da8 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -57,7 +57,7 @@ static void sp_execute_ex(zend_execute_data *execute_data) { } if (true == should_disable(execute_data)) { - return; + sp_terminate(); } if (execute_data->func->op_array.type == ZEND_EVAL_CODE) { diff --git a/src/tests/disabled_functions_chain.phpt b/src/tests/disabled_functions_chain.phpt index b25f800..ed680b1 100644 --- a/src/tests/disabled_functions_chain.phpt +++ b/src/tests/disabled_functions_chain.phpt @@ -23,6 +23,4 @@ echo "I'm after the call to outer\n"; --EXPECTF-- I'm before the call to outer I'm in the outer function, before the call! -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'outer>inner' in %a/disabled_functions_chain.php:%d has been disabled. -I'm in the outer function, after the call! -I'm after the call to outer +[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'outer>inner' in %a/disabled_functions_chain.php:%d has been disabled. \ No newline at end of file diff --git a/src/tests/disabled_functions_chain_call_user_func.phpt b/src/tests/disabled_functions_chain_call_user_func.phpt index e13bd5a..e431930 100644 --- a/src/tests/disabled_functions_chain_call_user_func.phpt +++ b/src/tests/disabled_functions_chain_call_user_func.phpt @@ -23,6 +23,4 @@ echo "I'm after the call to outer\n"; --EXPECTF-- I'm before the call to outer I'm in the outer function, before the call! -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php:%d has been disabled. -I'm in the outer function, after the call! -I'm after the call to outer +[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'outer>inner' in %a/disabled_functions_chain_call_user_func.php:%d has been disabled. \ No newline at end of file diff --git a/src/tests/disabled_functions_method.phpt b/src/tests/disabled_functions_method.phpt index 33651b7..f4fba85 100644 --- a/src/tests/disabled_functions_method.phpt +++ b/src/tests/disabled_functions_method.phpt @@ -25,5 +25,3 @@ $c->method3("pouet"); ?> --EXPECTF-- [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'AwesomeClass::method1' in %a/tests/disabled_functions_method.php:4 has been disabled. -method2:paf -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'AwesomeClass::method3' in %a/tests/disabled_functions_method.php:10 has been disabled, because its argument 'a' content (pouet) matched a rule. diff --git a/src/tests/disabled_functions_param_array.phpt b/src/tests/disabled_functions_param_array.phpt index 6596d1a..4738745 100644 --- a/src/tests/disabled_functions_param_array.phpt +++ b/src/tests/disabled_functions_param_array.phpt @@ -28,10 +28,4 @@ foo($a); ?> --EXPECTF-- test1 -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '1'. -abcde -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '2'. -eee -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '3'. -cccc -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '4'. +[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foo' in %a/disabled_functions_param_array.php:3 has been disabled, because its argument 'arr' content (Array) matched the rule '1'. \ No newline at end of file diff --git a/src/tests/disabled_functions_param_int.phpt b/src/tests/disabled_functions_param_int.phpt index 3b2cc08..0e6a62c 100644 --- a/src/tests/disabled_functions_param_int.phpt +++ b/src/tests/disabled_functions_param_int.phpt @@ -19,7 +19,3 @@ foobar("10"); --EXPECTF-- 1 [snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (42) matched a rule. -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (1337) matched a rule. -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (13374242) matched a rule. -[snuffleupagus][0.0.0.0][disabled_function][drop] The call to the function 'foobar' in %a/tests/disabled_functions_param_int.php:3 has been disabled, because its argument 'id' content (42) matched a rule. -10