From 5752a4148d661b1cf72229400f4ab0022c144446 Mon Sep 17 00:00:00 2001 From: Bhushan Kashyap Date: Sat, 21 Dec 2024 21:02:31 +0530 Subject: [PATCH] Media gallery: Fix incorrect image display for directories with identical names but different case --- .../CollectionProcessor/FilterProcessor/Directory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/Directory.php b/app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/Directory.php index 70bd4db8af50b..5eabbee576113 100644 --- a/app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/Directory.php +++ b/app/code/Magento/MediaGalleryUi/Model/SearchCriteria/CollectionProcessor/FilterProcessor/Directory.php @@ -19,7 +19,7 @@ class Directory implements CustomFilterInterface public function apply(Filter $filter, AbstractDb $collection): bool { $value = $filter->getValue() !== null ? str_replace('%', '', $filter->getValue()) : ''; - $collection->getSelect()->where('path REGEXP ? ', '^' . $value . '/[^\/]*$'); + $collection->getSelect()->where('BINARY path REGEXP ? ', '^' . $value . '/[^\/]*$'); return true; }