If you're currently cded into the root of the file system (/), this causes all the paths to have their slashes removed. For example, if I try linting /var/www/foo and there's an error inside /var/www/foo/bar.php, I'll get the following error:
Parse error: varwwwfoobar.php:123
This happens because getcwd() returns / and therefore it replaces every single slash in the path.
The
Error::getShortFilePath
method is currently implemented this way:If you're currently
cd
ed into the root of the file system (/
), this causes all the paths to have their slashes removed. For example, if I try linting/var/www/foo
and there's an error inside/var/www/foo/bar.php
, I'll get the following error:This happens because
getcwd()
returns/
and therefore it replaces every single slash in the path.