-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
Description
https://3v4l.org/UtjRl
This code should blame line 4, not line 7, since that's where the bogus constant is actually declared.
An example of where this is more problematic:
SomeClass.php
<?php
class SomeClass{
public const INGOT = IDontExist::INGOT;
}test.php
<?php
require 'SomeClass.php';
new SomeClass();Resulted in this output:
Fatal error: Uncaught Error: Class "IDontExist" not found in C:\stable\test4.php:5
But I expected this output instead:
Fatal error: Uncaught Error: Class "IDontExist" not found in C:\stable\SomeClass.php:4
This frequently causes issues with my telemetry because incorrect subsystems are getting blamed for errors when third-party plugin code comes into play.
PHP Version
8.0.13
Operating System
Windows (doubtful if relevant)