File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
CatalogSearch/Ui/DataProvider/Product
Ui/Component/Filters/Type Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 5
5
*/
6
6
namespace Magento \CatalogSearch \Ui \DataProvider \Product ;
7
7
8
- use Magento \Framework \Data \Collection ;
9
8
use Magento \CatalogSearch \Model \ResourceModel \Search \Collection as SearchCollection ;
9
+ use Magento \Framework \Data \Collection ;
10
10
use Magento \Ui \DataProvider \AddFilterToCollectionInterface ;
11
11
12
12
/**
@@ -30,14 +30,14 @@ public function __construct(SearchCollection $searchCollection)
30
30
}
31
31
32
32
/**
33
- * { @inheritdoc}
33
+ * @inheritdoc
34
34
*
35
35
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
36
36
*/
37
37
public function addFilter (Collection $ collection , $ field , $ condition = null )
38
38
{
39
39
/** @var $collection \Magento\Catalog\Model\ResourceModel\Product\Collection */
40
- if (isset ($ condition ['fulltext ' ]) && ! empty ( $ condition ['fulltext ' ]) ) {
40
+ if (isset ($ condition ['fulltext ' ]) && ( string ) $ condition ['fulltext ' ] !== '' ) {
41
41
$ this ->searchCollection ->addBackendSearchFilter ($ condition ['fulltext ' ]);
42
42
$ productIds = $ this ->searchCollection ->load ()->getAllIds ();
43
43
$ collection ->addIdFilter ($ productIds );
Original file line number Diff line number Diff line change 6
6
namespace Magento \Ui \Component \Filters \Type ;
7
7
8
8
/**
9
+ * Class Search
10
+ *
9
11
* @api
10
12
* @since 100.0.2
11
13
*/
@@ -34,7 +36,7 @@ protected function applyFilter()
34
36
{
35
37
$ value = $ this ->getContext ()->getRequestParam ('search ' );
36
38
37
- if ($ value ) {
39
+ if (( string ) $ value !== '' ) {
38
40
$ filter = $ this ->filterBuilder ->setConditionType ('fulltext ' )
39
41
->setField ($ this ->getName ())
40
42
->setValue ($ value )
You can’t perform that action at this time.
0 commit comments