Merge pull request #9471 from mattclegg/1587213647

BUGFIX: Ensure realpath returns a string for stripos
This commit is contained in:
Daniel Hensby 2020-04-19 10:01:52 +01:00 committed by GitHub
commit 99b63b6bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -271,7 +271,8 @@ class ModuleManifest
$modules = ModuleLoader::inst()->getManifest()->getModules();
foreach ($modules as $module) {
// Check if path is in module
if (stripos($path, realpath($module->getPath())) !== 0) {
$realPath = realpath($module->getPath());
if ($realPath && stripos($path, $realPath) !== 0) {
continue;
}