Skip to content

Commit 6db06a7

Browse files
authored
Fix class name in warning of frameless calls (#13619)
1 parent 089ef2a commit 6db06a7

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

Zend/tests/frameless_bug_001.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Frameless bug 001
3+
--FILE--
4+
<?php
5+
6+
namespace NS;
7+
8+
class Test {
9+
public function test() {
10+
return preg_match('foo', 'bar');
11+
}
12+
}
13+
14+
$test = new Test();
15+
$test->test();
16+
17+
?>
18+
--EXPECTF--
19+
Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL byte in %s on line %d

Zend/zend_execute_API.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ ZEND_API const char *get_active_class_name(const char **space) /* {{{ */
507507
return "";
508508
}
509509

510-
func = EG(current_execute_data)->func;
510+
func = zend_active_function();
511511

512512
switch (func->type) {
513513
case ZEND_USER_FUNCTION:

0 commit comments

Comments
 (0)