|
3 | 3 | * Copyright © Magento, Inc. All rights reserved.
|
4 | 4 | * See COPYING.txt for license details.
|
5 | 5 | */
|
| 6 | +declare(strict_types=1); |
| 7 | + |
6 | 8 | namespace Magento\CatalogSearch\Model\Search;
|
7 | 9 | /**
|
8 | 10 | * Search model for backend search
|
9 |
| - * |
10 |
| - * @method Category setQuery(string $query) |
11 |
| - * @method string|null getQuery() |
12 |
| - * @method bool hasQuery() |
13 |
| - * @method Category setStart(int $startPosition) |
14 |
| - * @method int|null getStart() |
15 |
| - * @method bool hasStart() |
16 |
| - * @method Category setLimit(int $limit) |
17 |
| - * @method int|null getLimit() |
18 |
| - * @method bool hasLimit() |
19 |
| - * @method Category setResults(array $results) |
20 |
| - * @method array getResults() |
21 |
| - * @api |
22 | 11 | */
|
23 | 12 | class Category extends \Magento\Framework\DataObject
|
24 | 13 | {
|
@@ -106,7 +95,7 @@ public function load()
|
106 | 95 | $searchResults = $this->categoryRepository->getList($searchCriteria);
|
107 | 96 |
|
108 | 97 | foreach ($searchResults->getItems() as $category) {
|
109 |
| - $description = strip_tags($category->getDescription()); |
| 98 | + $description = $category->getDescription() ? strip_tags($category->getDescription()) : ''; |
110 | 99 | $result[] = [
|
111 | 100 | 'id' => 'category/1/' . $category->getId(),
|
112 | 101 | 'type' => __('Category'),
|
|
0 commit comments