Skip to content

Commit eb44d8f

Browse files
Merge pull request #1129 from SilinMykola/1122-bug-fix-index-out-of-bounds-in-OverrideClassByAPreferenceDialog-class
1122 fix bug index out of bounds in OverrideClassByAPreferenceDialog class
2 parents 431a2e4 + 77a2d22 commit eb44d8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/OverrideClassByAPreferenceDialog.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private void suggestPreferenceDirectory(final PhpClass targetClass) {
146146
if (fqnParts.length != 0) {
147147
fqnParts = ArrayUtil.remove(fqnParts, fqnParts.length - 1);
148148
}
149-
if (fqnParts[1] != null) {
149+
if (fqnParts.length > 1 && fqnParts[1] != null) {
150150
fqnParts = ArrayUtil.remove(fqnParts, 1);
151151
}
152152
if (fqnParts[0] != null) {

0 commit comments

Comments
 (0)