1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext
Ilia Alshanetsky 53e31d5883 Fix GH-21362: ReflectionMethod::invoke() allows different Closures (#21366)
ReflectionMethod::invoke() (and invokeArgs()) for Closure::__invoke()
incorrectly accepted any Closure object, not just the one the
ReflectionMethod was created from. This happened because all Closures
share a single zend_ce_closure class entry, so the instanceof_function()
check always passed.

Fix: store the original Closure object in intern->obj during
ReflectionMethod construction, then compare object identity in
reflection_method_invoke() to reject different Closure instances.

Closes GH-21362
2026-03-07 17:19:33 -08:00
..
2026-03-02 18:51:57 +01:00
2026-02-27 15:05:28 +01:00
2026-03-05 22:32:38 +00:00
2026-02-04 17:10:53 +01:00
2026-03-07 13:30:28 +00:00
2026-03-05 18:52:08 +00:00
2026-03-07 14:09:49 +00:00
2026-03-07 11:18:33 +01:00
2026-03-06 09:55:12 +01:00