Merge pull request #461 from BelleNottelling/patch-1

Be descriptive if module folder doesn't match expected
This commit is contained in:
Yağızhan authored and GitHub committed 2022-11-16 08:44:17 +03:00
commit b3b8fcb38c
1 file changed
+6 -1
+6 -1
View File
@@ -301,6 +301,11 @@ class Box_Mod
private function _getModPath()
{
return BB_PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR;
$modPath = BB_PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR;
if(is_dir($modPath)){
return $modPath;
}else{
throw new Box_Exception("Error: module $this->mod path appears to be invalid. Please ensure the module folder is named " . ucfirst($this->mod));
}
}
}