Fix class name in warning of frameless calls (#13619)

This commit is contained in:
Ilija Tovilo 2024-03-07 20:11:27 +01:00 committed by GitHub
parent 089ef2ac61
commit 6db06a7c0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,19 @@
--TEST--
Frameless bug 001
--FILE--
<?php
namespace NS;
class Test {
public function test() {
return preg_match('foo', 'bar');
}
}
$test = new Test();
$test->test();
?>
--EXPECTF--
Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL byte in %s on line %d

View file

@ -507,7 +507,7 @@ ZEND_API const char *get_active_class_name(const char **space) /* {{{ */
return "";
}
func = EG(current_execute_data)->func;
func = zend_active_function();
switch (func->type) {
case ZEND_USER_FUNCTION: