BUGFIX: Ensure realpath returns a string for stripos

[Deprecated] stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
This commit is contained in:
mattclegg 2020-04-18 18:27:40 +05:45
parent a9c05f3287
commit 2169891651
No known key found for this signature in database
GPG Key ID: 68C4C8DB2D0D1DFE
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;
}