mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
87d86aaed9
The current checks are way too relaxed, and are more like testing for a substring, which makes it easy for invalid paths to slip trough, for example `/foo/var/www` is falsely tested to reside in `/var/www`. Passing an empty path never worked properly, it was triggering a warning, didn't worked on Windows, and the behavior that the current top level directory would be assumed for empty paths wasn't documented. Similar is true for relative paths. While they did match at one point, this was incorrect behavior, and matching actual path fragments seems out of scope for this method. This change makes the `$path` argument required, requires it to be an absolute path, and throws an exception in case a non-absolute path is being passed. |
||
---|---|---|
.. | ||
bake_compare | ||
Case | ||
Fixture | ||
test_app |