File tree 1 file changed +7
-2
lines changed
lib/internal/Magento/Framework/Mview/View
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ protected function getLinkedViews()
178
178
continue ;
179
179
}
180
180
// Search in view subscriptions
181
- foreach ($ view ->getSubscriptions () as $ subscription ) {
181
+ foreach ($ view ->getSubscriptions () ?? [] as $ subscription ) {
182
182
if ($ subscription ['name ' ] != $ this ->getTableName ()) {
183
183
continue ;
184
184
}
@@ -200,7 +200,12 @@ protected function buildStatement($event, $view)
200
200
{
201
201
// Get the subscription for the specific view and specific table.
202
202
// We will use column name from it.
203
- $ subscription = $ view ->getSubscriptions ()[$ this ->getTableName ()];
203
+ $ subscriptions = $ view ->getSubscriptions () ?? [];
204
+ if (empty ($ subscriptions [$ this ->getTableName ()])) {
205
+ return '' ;
206
+ }
207
+
208
+ $ subscription = $ subscriptions [$ this ->getTableName ()];
204
209
205
210
// Get the changelog from View to get changelog column name.
206
211
$ changelog = $ view ->getChangelog ();
You can’t perform that action at this time.
0 commit comments