summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvoisin2020-11-12 19:21:37 +0100
committerjvoisin2020-11-12 19:21:37 +0100
commit56376c73c6896ea581b10d5041822eafeb6010c1 (patch)
treeba7f4bf67aa49820d3e770d8b366c09b814567ef
parentf4bc388f1e4adb1b9dde5f3af77785101ad19857 (diff)
Simplify a bit a function
-rw-r--r--src/sp_execute.c24
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