Skip to content

Commit bfeec98

Browse files
Merge branch '4.4.0-develop' of github.com:magento/magento2-phpstorm-plugin into 1111-context-action-readme-generation
2 parents 2d25d90 + ecfe9ab commit bfeec98

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
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) {

src/com/magento/idea/magento2plugin/project/diagnostic/github/GitHubNewIssueBodyBuilderUtil.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static String buildNewBugReportBody(
4242
final @NotNull String stackTrace,
4343
final int maxAllowedBodyLength
4444
) {
45-
final int maxAllowedStackTraceLength = getMaxAllowedStackTraceLength(
45+
int maxAllowedStackTraceLength = getMaxAllowedStackTraceLength(
4646
project,
4747
bugDescription,
4848
maxAllowedBodyLength
@@ -56,6 +56,9 @@ public static String buildNewBugReportBody(
5656
String encodedCutStackTrace = "";
5757

5858
while (!isFound) {
59+
if (stackTrace.length() < maxAllowedStackTraceLength) {
60+
maxAllowedStackTraceLength = stackTrace.length();
61+
}
5962
final String cutStackTrace = stackTrace.substring(0, maxAllowedStackTraceLength - step);
6063
encodedCutStackTrace = encode(cutStackTrace);
6164

0 commit comments

Comments
 (0)