diff --git a/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php b/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php index 77ccce5d23bde..79d449a886a2b 100644 --- a/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php +++ b/app/code/Magento/Store/App/Config/Source/RuntimeConfigSource.php @@ -83,12 +83,17 @@ private function getConnection() */ private function getEntities($table, $keyField) { - $entities = $this->getConnection()->fetchAll( - $this->getConnection()->select()->from($this->resourceConnection->getTableName($table)) - ); $data = []; - foreach ($entities as $entity) { - $data[$entity[$keyField]] = $entity; + $tableName = $this->resourceConnection->getTableName($table); + // Check if db table exists before fetch data + if($this->resourceConnection->getConnection()->isTableExists($tableName)) { + $entities = $this->getConnection()->fetchAll( + $this->getConnection()->select()->from($tableName) + ); + + foreach ($entities as $entity) { + $data[$entity[$keyField]] = $entity; + } } return $data;