Skip to content
Snippets Groups Projects
Commit 52ec9767 authored by Frank Mably's avatar Frank Mably
Browse files

Issue #3513050 by mably: TypeError: Drupal\Component\Utility\Html::escape():...

parent 91b742e7
Branches
Tags
1 merge request!45Issue #3513050 by mably: TypeError: Drupal\Component\Utility\Html::escape():...
Pipeline #448591 passed
......@@ -26,10 +26,13 @@ function views_filters_summary_search_api_views_filters_summary_plugin_alias($fi
* Implements hook_views_filters_summary_replacements_alter().
*/
function views_filters_summary_search_api_views_filters_summary_replacements_alter(&$replacements, $view) {
foreach ($view->display_handler->handlers["filter"] as $filter) {
if ($filter->getPluginId() == 'search_api_fulltext') {
$identifier = $filter->options["expose"]["identifier"];
$replacements['search_api_fulltext'] = Html::escape($view->exposed_data[$identifier]);
foreach ($view->display_handler->handlers['filter'] as $filter) {
if ($filter->getPluginId() === 'search_api_fulltext') {
$identifier = $filter->options['expose']['identifier'];
$exposed_data = $view->exposed_data[$identifier] ?? NULL;
if (!empty($exposed_data)) {
$replacements['search_api_fulltext'] = Html::escape($exposed_data);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment