33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-17 02:25:10 +00:00

check namespace path directory exists

This commit is contained in:
Denis Ryabov 2021-03-10 00:40:53 +03:00
parent a88050c37b
commit fefbb2ca8e

View File

@ -304,6 +304,17 @@ class JedcheckerRulesXMLFiles extends JEDcheckerRule
}
}
// Check /namespace[path] directory exists (Joomla!4)
if (isset($xml->namespace['path']))
{
$folder = (string) $xml->namespace['path'];
if (!is_dir($admindir . $folder) && !is_dir($sitedir . $folder))
{
$this->errors[] = JText::sprintf('COM_JEDCHECKER_XML_FILES_FOLDER_NOT_FOUND', $folder);
}
}
if (count($this->errors))
{
$this->report->addError($file, implode('<br />', $this->errors));