File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
app/code/Magento/Store/Model/ResourceModel Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -166,11 +166,16 @@ protected function _changeGroup(\Magento\Framework\Model\AbstractModel $model)
166166 */
167167 public function readAllStores ()
168168 {
169- $ select = $ this ->getConnection ()
170- ->select ()
171- ->from ($ this ->getTable ('store ' ));
169+ $ stores = [];
170+ if ($ this ->getConnection ()->isTableExists ($ this ->getMainTable ())) {
171+ $ select = $ this ->getConnection ()
172+ ->select ()
173+ ->from ($ this ->getTable ($ this ->getMainTable ()));
172174
173- return $ this ->getConnection ()->fetchAll ($ select );
175+ $ stores = $ this ->getConnection ()->fetchAll ($ select );
176+ }
177+
178+ return $ stores ;
174179 }
175180
176181 /**
Original file line number Diff line number Diff line change @@ -47,12 +47,14 @@ protected function _initUniqueFields()
4747 public function readAllWebsites ()
4848 {
4949 $ websites = [];
50- $ select = $ this ->getConnection ()
51- ->select ()
52- ->from ($ this ->getTable ('store_website ' ));
50+ if ($ this ->getConnection ()->isTableExists ($ this ->getMainTable ())) {
51+ $ select = $ this ->getConnection ()
52+ ->select ()
53+ ->from ($ this ->getTable ($ this ->getMainTable ()));
5354
54- foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
55- $ websites [$ websiteData ['code ' ]] = $ websiteData ;
55+ foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
56+ $ websites [$ websiteData ['code ' ]] = $ websiteData ;
57+ }
5658 }
5759
5860 return $ websites ;
You can’t perform that action at this time.
0 commit comments