From a4cadb88622ea27e5f69c0f5060b577f9e2fbaa0 Mon Sep 17 00:00:00 2001 From: Vlad Podorozhnyi Date: Wed, 10 Jan 2024 14:19:41 +0100 Subject: [PATCH] Fix integration tests (most likely caused by incorrect merge conflict resolving): error msg: 1) Magento\Catalog\Block\Adminhtml\Category\Checkboxes\TreeTest::testGetTreeJson Error: Call to a member function getConnectionName() on null /var/www/html/lib/internal/Magento/Framework/App/ResourceConnection.php:110 /var/www/html/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php:570 ... ref: https://github.com/vpodorozh/mageos-magento2/actions/runs/7472531139/job/20334972566#step:6:39 --- .../Catalog/Model/ResourceModel/Category/Collection.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index d77ec3a5c3a..259399ece82 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -567,8 +567,7 @@ private function getProductsCountFromCategoryTable(Category $item, string $websi */ private function getProductsCountQuery(array $categoryIds, $addVisibilityFilter = true): Select { - $connections = $this->_resource->getConnection(); - $categoryTable = $connections->getTableName('catalog_category_product_index'); + $categoryTable = $this->_resource->getTableName('catalog_category_product_index'); $select = $this->_conn->select() ->from( ['cat_index' => $categoryTable],