From f9efb6dc76f20b4477bcc3705775775bf706e75a Mon Sep 17 00:00:00 2001 From: alaunois Date: Fri, 30 Sep 2022 16:19:22 +0200 Subject: [PATCH] fix(upgrade) fix fetch by column (#11908) --- www/install/php/Update-22.04.0-beta.1.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/install/php/Update-22.04.0-beta.1.php b/www/install/php/Update-22.04.0-beta.1.php index 5e4a9550566..1fbaea41b5f 100644 --- a/www/install/php/Update-22.04.0-beta.1.php +++ b/www/install/php/Update-22.04.0-beta.1.php @@ -515,7 +515,7 @@ function migrateBrokerConfigOutputsToUnifiedSql(CentreonDB $pearDB): void if (empty($unifiedSqlType)) { throw new \Exception("Cannot find 'unified_sql' in cb_type table"); } - $unifiedSqlTypeId = (int) $unifiedSqlType['cb_type_id']; + $unifiedSqlTypeId = (int) $unifiedSqlType; foreach ($configIds as $configId) { // Find next config group id @@ -527,7 +527,7 @@ function migrateBrokerConfigOutputsToUnifiedSql(CentreonDB $pearDB): void if (empty($maxConfigGroupId)) { throw new \Exception("Cannot find max config group id in cfg_centreonbroker_info table"); } - $nextConfigGroupId = (int) $maxConfigGroupId['max_config_group_id'] + 1; + $nextConfigGroupId = (int) $maxConfigGroupId + 1; $blockIdsQueryBinds = []; foreach ($blockIds as $key => $value) { $blockIdsQueryBinds[':block_id_' . $key] = $value;