mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix lineno for inheritance errors of early bound classes
This commit is contained in:
commit
e02085359d
3 changed files with 24 additions and 0 deletions
2
NEWS
2
NEWS
|
@ -17,6 +17,8 @@ PHP NEWS
|
|||
call trampoline). (ilutov)
|
||||
. Fixed bug GH-16509 (Incorrect line number in function redeclaration error).
|
||||
(ilutov)
|
||||
. Fixed bug GH-16508 (Incorrect line number in inheritance errors of delayed
|
||||
early bound classes). (ilutov)
|
||||
|
||||
- Curl:
|
||||
. Fixed bug GH-16302 (CurlMultiHandle holds a reference to CurlHandle if
|
||||
|
|
20
Zend/tests/gh16508.phpt
Normal file
20
Zend/tests/gh16508.phpt
Normal file
|
@ -0,0 +1,20 @@
|
|||
--TEST--
|
||||
GH-16508: Missing lineno in inheritance errors of delayed early bound classes
|
||||
--EXTENSIONS--
|
||||
opcache
|
||||
--INI--
|
||||
opcache.enable_cli=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
new Test2;
|
||||
|
||||
class Test2 extends Test {}
|
||||
|
||||
abstract class Test {
|
||||
abstract function foo();
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Class Test2 contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Test::foo) in %s on line 5
|
|
@ -3410,6 +3410,8 @@ ZEND_API zend_class_entry *zend_try_early_bind(zend_class_entry *ce, zend_class_
|
|||
CG(current_linking_class) = is_cacheable ? ce : NULL;
|
||||
|
||||
zend_try{
|
||||
CG(zend_lineno) = ce->info.user.line_start;
|
||||
|
||||
if (is_cacheable) {
|
||||
zend_begin_record_errors();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue