Skip to content

Commit bd79e8c

Browse files
committed
1000: Fixed bug report
1 parent e4be0b9 commit bd79e8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/com/magento/idea/magento2plugin/util/magento/GetModuleNameByDirectoryUtil.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ private GetModuleNameByDirectoryUtil() {}
4444
final String moduleNamePath = matcher.group(0);
4545

4646
if (!moduleNamePath.isEmpty()) {
47-
return moduleNamePath.split("/")[5];
47+
final String[] moduleNamePathParts = moduleNamePath.split("/");
48+
49+
if (moduleNamePathParts.length >= 6) { //NOPMD
50+
return moduleNamePath.split("/")[5];
51+
}
4852
}
4953
}
5054

0 commit comments

Comments
 (0)