Skip to content

Commit

Permalink
#2321 - Refactor populate_fcic() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeckerson committed Nov 13, 2021
1 parent faf3f2b commit 0a30a36
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions kernels/ZendEngine3/fcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,19 +279,16 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze
break;

case zephir_fcall_ce:
fcic->calling_scope = ce;

#if PHP_VERSION_ID >= 80000
if (ce && Z_TYPE_P(func) == IS_STRING) {
fcic->function_handler = zend_hash_find_ptr(&ce->function_table, Z_STR_P(func));

fcic->calling_scope = ce;
} else if (calling_scope && Z_TYPE_P(func) == IS_STRING) {
fcic->function_handler = zend_hash_find_ptr(&calling_scope->function_table, Z_STR_P(func));
fcic->calling_scope = calling_scope;
}
#endif
// TODO: Check for PHP 7.4 and PHP 8.0, as it rewrite from above
fcic->calling_scope = ce;
fcic->called_scope = ce;
break;

case zephir_fcall_function:
Expand Down Expand Up @@ -323,9 +320,6 @@ static void populate_fcic(zend_fcall_info_cache* fcic, zephir_call_type type, ze
}

break;

default:
return;
}
}

Expand Down

0 comments on commit 0a30a36

Please sign in to comment.