diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/sp_execute.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c index ab73972..de83a2a 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -156,6 +156,7 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 156 | return; | 156 | return; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | // If we're at an internal function | ||
| 159 | if (!execute_data->prev_execute_data || | 160 | if (!execute_data->prev_execute_data || |
| 160 | !execute_data->prev_execute_data->func || | 161 | !execute_data->prev_execute_data->func || |
| 161 | !ZEND_USER_CODE(execute_data->prev_execute_data->func->type) || | 162 | !ZEND_USER_CODE(execute_data->prev_execute_data->func->type) || |
| @@ -163,17 +164,18 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 163 | should_disable_ht(execute_data, function_name, NULL, NULL, | 164 | should_disable_ht(execute_data, function_name, NULL, NULL, |
| 164 | config_disabled_functions_reg, | 165 | config_disabled_functions_reg, |
| 165 | config_disabled_functions); | 166 | config_disabled_functions); |
| 166 | } else if ((execute_data->prev_execute_data->opline->opcode == | 167 | } else { // If we're at a userland function call |
| 167 | ZEND_DO_FCALL || | 168 | switch (execute_data->prev_execute_data->opline->opcode) { |
| 168 | execute_data->prev_execute_data->opline->opcode == | 169 | case ZEND_DO_FCALL: |
| 169 | ZEND_DO_UCALL || | 170 | case ZEND_DO_FCALL_BY_NAME: |
| 170 | execute_data->prev_execute_data->opline->opcode == | 171 | case ZEND_DO_ICALL: |
| 171 | ZEND_DO_ICALL || | 172 | case ZEND_DO_UCALL: |
| 172 | execute_data->prev_execute_data->opline->opcode == | 173 | should_disable_ht(execute_data, function_name, NULL, NULL, |
| 173 | ZEND_DO_FCALL_BY_NAME)) { | 174 | config_disabled_functions_reg, |
| 174 | should_disable_ht(execute_data, function_name, NULL, NULL, | 175 | config_disabled_functions); |
| 175 | config_disabled_functions_reg, | 176 | default: |
| 176 | config_disabled_functions); | 177 | break; |
| 178 | } | ||
| 177 | } | 179 | } |
| 178 | 180 | ||
| 179 | // When a function's return value isn't used, php doesn't store it in the | 181 | // When a function's return value isn't used, php doesn't store it in the |
