Skip to content

Commit 35620e2

Browse files
MAGETWO-94565: Catalog product collection filters produce errors and cause inconsistent behaviour
- Fix strict types.
1 parent 3ccf1d9 commit 35620e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ protected function _getMaxPosition($path)
355355
{
356356
$connection = $this->getConnection();
357357
$positionField = $connection->quoteIdentifier('position');
358-
$level = count(explode('/', $path));
358+
$level = count(explode('/', (string)$path));
359359
$bind = ['c_level' => $level, 'c_path' => $path . '/%'];
360360
$select = $connection->select()->from(
361361
$this->getTable('catalog_category_entity'),
@@ -720,7 +720,7 @@ public function getCategories($parent, $recursionLevel = 0, $sorted = false, $as
720720
*/
721721
public function getParentCategories($category)
722722
{
723-
$pathIds = array_reverse(explode(',', $category->getPathInStore()));
723+
$pathIds = array_reverse(explode(',', (string)$category->getPathInStore()));
724724
/** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $categories */
725725
$categories = $this->_categoryCollectionFactory->create();
726726
return $categories->setStore(

0 commit comments

Comments
 (0)