File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
CatalogSearch/Ui/DataProvider/Product
Ui/Component/Filters/Type Expand file tree Collapse file tree 2 files changed +3
-3
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
/**
@@ -37,7 +37,7 @@ public function __construct(SearchCollection $searchCollection)
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 ' ]) && 0 !== strlen ( $ 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 @@ -34,7 +34,7 @@ protected function applyFilter()
34
34
{
35
35
$ value = $ this ->getContext ()->getRequestParam ('search ' );
36
36
37
- if (0 !== strlen ( $ value ) ) {
37
+ if (( string ) $ value !== '' ) {
38
38
$ filter = $ this ->filterBuilder ->setConditionType ('fulltext ' )
39
39
->setField ($ this ->getName ())
40
40
->setValue ($ value )
You can’t perform that action at this time.
0 commit comments