Skip to content

Commit ae3cbb9

Browse files
committed
Do not throw \LogicException, as it would break backwards-compatibility.
1 parent ef525e5 commit ae3cbb9

File tree

1 file changed

+3
-2
lines changed
  • lib/internal/Magento/Framework/Module

1 file changed

+3
-2
lines changed

lib/internal/Magento/Framework/Module/Dir.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ public function getDir($moduleName, $type = '')
4545
{
4646
$path = $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, $moduleName);
4747

48-
if (! isset($path)) {
49-
throw new \LogicException("Component '$moduleName' of type '$type' is not correctly registered.");
48+
if (!isset($path)) {
49+
// (Do not throw \LogicException, as it would break backwards-compatibility.)
50+
throw new \InvalidArgumentException("Component '$moduleName' of type '$type' is not correctly registered.");
5051
}
5152

5253
if ($type) {

0 commit comments

Comments
 (0)