File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -947,13 +947,14 @@ private function setCache(array $values): void
947947 $ this ->cache = [];
948948 }
949949
950- // Shallow-merge the top-level items
950+ // Extract any settings now to prevent accidental merge issues
951+ $ oldSettings = ArrayHelper::remove ($ this ->cache , 'settings ' ) ?? [];
952+ $ newSettings = ArrayHelper::remove ($ values , 'settings ' ) ?? [];
953+
954+ // Shallow-merge the top-level items (connection status, etc)
951955 $ this ->cache = array_merge ($ this ->cache , $ values );
952956
953957 // Merge stored and new settings (so they work across forms)
954- $ oldSettings = $ this ->cache ['settings ' ] ?? [];
955- $ newSettings = $ values ['settings ' ] ?? [];
956-
957958 $ this ->cache ['settings ' ] = array_merge ($ oldSettings , $ newSettings );
958959
959960 // Add support for emoji in cached content
You can’t perform that action at this time.
0 commit comments