File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,12 @@ public function getNonExistingTables(): array {
57
57
$ existingTables = $ this ->db ->getTablesName ();
58
58
}
59
59
$ tables = Reflexion::getAllJoinTables ($ this ->models );
60
- foreach ($ this ->metadatas as $ model => $ metas ) {
61
- $ tablename = $ metas ['#tableName ' ];
62
- if (\array_search ($ tablename , $ existingTables ) === false && \array_search ($ tablename , $ tables ) === false ) {
63
- $ tables [$ model ] = $ tablename ;
60
+ if (isset ($ this ->metadatas )) {
61
+ foreach ($ this ->metadatas as $ model => $ metas ) {
62
+ $ tablename = $ metas ['#tableName ' ];
63
+ if (\array_search ($ tablename , $ existingTables ) === false && \array_search ($ tablename , $ tables ) === false ) {
64
+ $ tables [$ model ] = $ tablename ;
65
+ }
64
66
}
65
67
}
66
68
return \array_diff ($ tables , $ existingTables );
You can’t perform that action at this time.
0 commit comments