Skip to content

Commit

Permalink
Merge pull request #2424 from zephir-lang/suppress-callable-deprecations
Browse files Browse the repository at this point in the history
#2405 - Suppress callable deprecations
  • Loading branch information
Jeckerson committed Feb 7, 2024
2 parents 336219c + 7543e17 commit d1bb90a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kernel/fcall.c
Expand Up @@ -371,7 +371,11 @@ int zephir_call_user_function(

char *is_callable_error = NULL;
zend_execute_data *frame = EG(current_execute_data);
#if PHP_VERSION_ID >= 80200
if (obj_ce || !zend_is_callable_at_frame(&callable, fci.object, frame, IS_CALLABLE_SUPPRESS_DEPRECATIONS, &fcic, &is_callable_error)) {
#else
if (obj_ce || !zend_is_callable_at_frame(&callable, fci.object, frame, 0, &fcic, &is_callable_error)) {
#endif
if (is_callable_error) {
zend_error(E_WARNING, "%s", is_callable_error);
efree(is_callable_error);
Expand Down Expand Up @@ -591,7 +595,11 @@ int zephir_call_user_func_array_noex(zval *return_value, zval *handler, zval *pa
}

zend_execute_data *frame = EG(current_execute_data);
#if PHP_VERSION_ID >= 80200
if (!zend_is_callable_at_frame(handler, NULL, frame, IS_CALLABLE_SUPPRESS_DEPRECATIONS, &fci_cache, &is_callable_error)) {
#else
if (!zend_is_callable_at_frame(handler, NULL, frame, 0, &fci_cache, &is_callable_error)) {
#endif
if (is_callable_error) {
zend_error(E_WARNING, "%s", is_callable_error);
efree(is_callable_error);
Expand Down

0 comments on commit d1bb90a

Please sign in to comment.