diff --git a/Civi/DataProcessor/Source/SQLTable.php b/Civi/DataProcessor/Source/SQLTable.php index d37e7301e29a82de89e3e6b5bd50aea9f18b7463..e8794890346d5216aee5127f28af0d4e22f84824 100644 --- a/Civi/DataProcessor/Source/SQLTable.php +++ b/Civi/DataProcessor/Source/SQLTable.php @@ -65,6 +65,10 @@ class SQLTable extends AbstractSource { * @throws \Civi\DataProcessor\DataSpecification\FieldExistsException */ protected function loadFields(DataSpecification $dataSpecification, $fieldsToSkip=[]) { + if (!\CRM_Core_DAO::checkTableExists($this->getTable())) { + \Civi::log()->error('Table ' . $this->getTable() . ' does not exist!'); + return; + } $dao = \CRM_Core_DAO::executeQuery('SHOW COLUMNS FROM ' . $this->getTable()); while ($dao->fetch()) { if (in_array($dao->Field, $fieldsToSkip)) {