Skip to content

Commit d1bb90a

Browse files
authored
Merge pull request #2424 from zephir-lang/suppress-callable-deprecations
#2405 - Suppress callable deprecations
2 parents 336219c + 7543e17 commit d1bb90a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

kernel/fcall.c

+8
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,11 @@ int zephir_call_user_function(
371371

372372
char *is_callable_error = NULL;
373373
zend_execute_data *frame = EG(current_execute_data);
374+
#if PHP_VERSION_ID >= 80200
375+
if (obj_ce || !zend_is_callable_at_frame(&callable, fci.object, frame, IS_CALLABLE_SUPPRESS_DEPRECATIONS, &fcic, &is_callable_error)) {
376+
#else
374377
if (obj_ce || !zend_is_callable_at_frame(&callable, fci.object, frame, 0, &fcic, &is_callable_error)) {
378+
#endif
375379
if (is_callable_error) {
376380
zend_error(E_WARNING, "%s", is_callable_error);
377381
efree(is_callable_error);
@@ -591,7 +595,11 @@ int zephir_call_user_func_array_noex(zval *return_value, zval *handler, zval *pa
591595
}
592596

593597
zend_execute_data *frame = EG(current_execute_data);
598+
#if PHP_VERSION_ID >= 80200
599+
if (!zend_is_callable_at_frame(handler, NULL, frame, IS_CALLABLE_SUPPRESS_DEPRECATIONS, &fci_cache, &is_callable_error)) {
600+
#else
594601
if (!zend_is_callable_at_frame(handler, NULL, frame, 0, &fci_cache, &is_callable_error)) {
602+
#endif
595603
if (is_callable_error) {
596604
zend_error(E_WARNING, "%s", is_callable_error);
597605
efree(is_callable_error);

0 commit comments

Comments
 (0)