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()
8383 */
8484 private function getEntities ($ table , $ keyField )
8585 {
86- $ entities = $ this ->getConnection ()->fetchAll (
87- $ this ->getConnection ()->select ()->from ($ this ->resourceConnection ->getTableName ($ table ))
88- );
8986 $ 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+ }
9297 }
9398
9499 return $ data ;
You can’t perform that action at this time.
0 commit comments