[php-src] PR #25504: Add assertion for zend_call_method object
| From: | kairosci | Date: | Mon, 16 Nov 2026 21:51:50 +0000 |
| Subject: | [php-src] PR #25504: Add assertion for zend_call_method object | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40709@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25504
Author: kairosci
Fixes the invalid receiver case reported in GH-25405 by asserting the
zend_call_method() contract before dispatch. A null object is valid only when the
resolved function is a free function or static method.
The check runs after resolving the function, so it also covers cached fn_proxy calls.
Valid calls are unchanged.
Checks:
- make -j4 — passed.
- git diff --check — passed.
- ext/zend_test/tests/internal-call-internal-static-return.phpt — skipped because
zend_test is not enabled in this build.
The build uses -DNDEBUG, so it does not validate assertion firing. No crash-based PHPT
was added.