Skip to content

Commit ecd9d76

Browse files
committed
Fix #65108 (is_callable() triggers Fatal Error)
We have to check if the fcall info cache contains a pointer if we use __call, otherwise we endup in a static lookup.
1 parent 9da4985 commit ecd9d76

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PHP NEWS
55
- Core:
66
. Fixed bug #65088 (Generated configure script is malformed on OpenBSD).
77
(Adam)
8+
. Fixed bug #65108 (is_callable() triggers Fatal Error). (David Soria Parra)
89

910
OPcache
1011
. OPcache must be compatible with LiteSpeed SAPI (Dmitry)

Zend/zend_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ static int zend_is_callable_check_func(int check_flags, zval *callable, zend_fca
28422842
}
28432843
if ((check_flags & IS_CALLABLE_CHECK_NO_ACCESS) == 0 &&
28442844
(fcc->calling_scope &&
2845-
(fcc->calling_scope->__call ||
2845+
((fcc->calling_scope->__call && fcc->object_ptr) ||
28462846
fcc->calling_scope->__callstatic))) {
28472847
if (fcc->function_handler->op_array.fn_flags & ZEND_ACC_PRIVATE) {
28482848
if (!zend_check_private(fcc->function_handler, fcc->object_ptr ? Z_OBJCE_P(fcc->object_ptr) : EG(scope), lmname, mlen TSRMLS_CC)) {

0 commit comments

Comments
 (0)