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.
2 parents a2d1306 + 41e1c4a commit 495e428Copy full SHA for 495e428
src/com/magento/idea/magento2uct/util/php/MagentoTypeEscapeUtil.java
@@ -32,7 +32,13 @@ private MagentoTypeEscapeUtil() {
32
String result = typeFqn;
33
34
while (matcher.find()) {
35
- result = result.substring(0, matcher.start(0)) + result.substring(matcher.end(0));
+ final int begin = matcher.start(0);
36
+ final int end = matcher.end(0);
37
+
38
+ if (begin < 0 || begin > end || end > result.length()) {
39
+ continue;
40
+ }
41
+ result = result.substring(0, begin) + result.substring(end);
42
}
43
44
return typeFqn.equals(result) ? typeFqn : result;
0 commit comments