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
SyntaxError::getNormalizedMessage(): bug fix - "in file on line" doesn't always get stripped
In certain cases, PHP puts the full file name in the error message. In those cases the "in filename.php on line .." trailing part of the error message did not get stripped off.
Also, in some cases, when Windows slashes are used in the file path, the "in filename.php on line .." trailing part of the error message may not get stripped off.
This last case will be exceedingly rare as on Windows, those file paths are handled correctly and the chances of a non-Windows user passing a path using Windows slashes will be minuscule.
Even so, I've fixed both cases by making the path handling in the function more robust.
* When the initial stripping of the trailing part of the error message fails, it will be retried up to two times.
* The first time, if Windows slashes would be found in the file path _after_ the `basename()` function has been applied, a "manual" basename extraction is done and the stripping of the trailing part is retried.
* The second time, the full file path is used in a last attempt to strip the trailing part of the error message.
Fixes 94
0 commit comments