File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
app/code/Magento/Store/App/Config/Source Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,17 @@ private function getConnection()
83
83
*/
84
84
private function getEntities ($ table , $ keyField )
85
85
{
86
- $ entities = $ this ->getConnection ()->fetchAll (
87
- $ this ->getConnection ()->select ()->from ($ this ->resourceConnection ->getTableName ($ table ))
88
- );
89
86
$ data = [];
90
- foreach ($ entities as $ entity ) {
91
- $ data [$ entity [$ keyField ]] = $ entity ;
87
+ $ tableName = $ this ->resourceConnection ->getTableName ($ table );
88
+ // Check if db table exists before fetch data
89
+ if ($ this ->resourceConnection ->getConnection ()->isTableExists ($ tableName )) {
90
+ $ entities = $ this ->getConnection ()->fetchAll (
91
+ $ this ->getConnection ()->select ()->from ($ tableName )
92
+ );
93
+
94
+ foreach ($ entities as $ entity ) {
95
+ $ data [$ entity [$ keyField ]] = $ entity ;
96
+ }
92
97
}
93
98
94
99
return $ data ;
You can’t perform that action at this time.
0 commit comments