mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
Merge branch 'PHP-8.2'
* PHP-8.2: Don't check "fake" closures (fix assertion)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
First class callables and &__call()
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
public function &__call($method, $args) {
|
||||
return $method;
|
||||
}
|
||||
}
|
||||
|
||||
$foo = new Foo;
|
||||
$bar = $foo->bar(...);
|
||||
echo $bar(),"\n";
|
||||
?>
|
||||
--EXPECT--
|
||||
bar
|
||||
+1
-1
@@ -4165,7 +4165,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER))
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
if (!EG(exception) && call->func) {
|
||||
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||
if (should_throw) {
|
||||
zend_internal_call_arginfo_violation(call->func);
|
||||
}
|
||||
|
||||
Generated
+3
-3
@@ -1845,7 +1845,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
if (!EG(exception) && call->func) {
|
||||
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||
if (should_throw) {
|
||||
zend_internal_call_arginfo_violation(call->func);
|
||||
}
|
||||
@@ -1954,7 +1954,7 @@ static ZEND_VM_HOT ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_RETV
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
if (!EG(exception) && call->func) {
|
||||
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||
if (should_throw) {
|
||||
zend_internal_call_arginfo_violation(call->func);
|
||||
}
|
||||
@@ -2064,7 +2064,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_OBS
|
||||
}
|
||||
|
||||
#if ZEND_DEBUG
|
||||
if (!EG(exception) && call->func) {
|
||||
if (!EG(exception) && call->func && !(call->func->common.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
|
||||
if (should_throw) {
|
||||
zend_internal_call_arginfo_violation(call->func);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user