From cd34dc80ee2245cbf12ed952dee34864d8f7048b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 13 Dec 2023 15:07:35 +1300 Subject: [PATCH] Handle NULL in table name check --- ext/civiimport/civiimport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/civiimport/civiimport.php b/ext/civiimport/civiimport.php index b094f62788..5b34e52b9f 100644 --- a/ext/civiimport/civiimport.php +++ b/ext/civiimport/civiimport.php @@ -106,7 +106,7 @@ function _civiimport_civicrm_get_import_tables(): array { $importEntities = []; while ($tables->fetch()) { $tableName = json_decode($tables->metadata, TRUE)['DataSource']['table_name']; - if (!CRM_Utils_Rule::alphanumeric($tableName) || !CRM_Core_DAO::singleValueQuery('SHOW TABLES LIKE %1', [1 => [$tableName, 'String']])) { + if (!$tableName || !CRM_Utils_Rule::alphanumeric($tableName) || !CRM_Core_DAO::singleValueQuery('SHOW TABLES LIKE %1', [1 => [$tableName, 'String']])) { continue; } $createdBy = !$tables->display_name ? '' : ' (' . E::ts('created by %1', [1 => $tables->display_name]) . ')'; -- 2.25.1