You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delayed early binding can report wrong lineno #16508
<?phpnewTest2;
class Test2 extends Test {}
abstractclass Test {
abstractfunctionfoo();
}
Resulted in this output:
Fatal error: Class Test2 contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Test::foo) in C:\php-sdk\phpdev\vs17\x64\delayed.php on line 0
But I expected this output instead:
Fatal error: Class Test2 contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Test::foo) in C:\php-sdk\phpdev\vs17\x64\delayed.php on line 4
The problem is that neither zend_accel_do_delayed_early_binding() nor zend_try_early_bind() set CG(zend_lineno), and as such errors report lineno 0.
This has been found due to a00c734, but is a more general issue that not only affects Windows.
I haven't checked older branches, but these may be affected as well.
btw Building PHP 8.4.0RC3 I see that commit 5a639c5 is wrong and the test failed
TEST 3342/18488 [Zend/tests/gh16508.phpt]
========DIFF========
001- Fatal error: Class Test2 contains 1 abstract method and must therefore be declared abstract or implement the remaining method (Test::foo) in %s on line 5
001+ Fatal error: Class Test2 contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Test::foo) in /builds/alpine/aports/testing/php84/src/php-8.4.0RC3/Zend/tests/gh16508.php on line 5
========DONE========
Activity
[skip ci] Fix test expectation for Windows
Fix lineno for inheritance errors of early bound classes
Fix lineno for inheritance errors of early bound classes
andypost commentedon Oct 22, 2024
btw Building PHP 8.4.0RC3 I see that commit 5a639c5 is wrong and the test failed
iluuu1994 commentedon Oct 22, 2024
@andypost Thank you. I fixed it now, but unfortunately 8.4.0RC3 is tagged, so this will fail until the next RC.
andypost commentedon Oct 22, 2024
Thank you, added as patch