We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae3cbb9 commit 36268c6Copy full SHA for 36268c6
lib/internal/Magento/Framework/Module/Dir.php
@@ -45,8 +45,9 @@ public function getDir($moduleName, $type = '')
45
{
46
$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, $moduleName);
47
48
- if (!isset($path)) {
49
- // (Do not throw \LogicException, as it would break backwards-compatibility.)
+ // An empty $type means it's gettind the directory of the module itself.
+ if (empty($type) && !isset($path)) {
50
+ // Note: do not throw \LogicException, as it would break backwards-compatibility.
51
throw new \InvalidArgumentException("Component '$moduleName' of type '$type' is not correctly registered.");
52
}
53
0 commit comments