Skip to content

Commit c28f4b4

Browse files
committed
AC-12336: WYSIWYG is empty in dynamic rows
Fix for static test failure
1 parent 7f3d8d4 commit c28f4b4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

app/code/Magento/Ui/Plugin/Config/Backend/ArraySerializedPlugin.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ public function afterAfterLoad(ArraySerialized $subject, ArraySerialized $result
5656
}
5757

5858
$value = $subject->getValue();
59+
if (!is_array($value)) {
60+
return $result;
61+
}
5962

60-
// If the value is an array but has string keys (row1, row2, row3)
61-
if (is_array($value) && !empty($value)) {
62-
$keys = array_keys($value);
63-
64-
// Check if keys are string-based (row1, row2, row3) instead of numeric
65-
if (!empty($keys) && !is_numeric($keys[0])) {
66-
// Convert to numerically indexed array
67-
$convertedValue = array_values($value);
68-
$subject->setValue($convertedValue);
69-
}
63+
$keys = array_keys($value);
64+
// Check if keys are string-based (row1, row2, row3) instead of numeric
65+
if (empty($keys) || is_numeric($keys[0])) {
66+
return $result;
7067
}
7168

69+
// Convert to numerically indexed array
70+
$convertedValue = array_values($value);
71+
$subject->setValue($convertedValue);
7272
return $result;
7373
}
7474
}

0 commit comments

Comments
 (0)