Loading matomo.module +2 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,8 @@ function matomo_preprocess_search_results(&$variables) { // found. But the pager item mumber can tell the number of search results. global $pager_total_items; drupal_add_js('window.matomo_search_results = ' . intval($pager_total_items[0]) . ';', array('type' => 'inline', 'group' => JS_LIBRARY-1)); $result_count = isset($pager_total_items) ? intval($pager_total_items[0]) : 0; drupal_add_js('window.matomo_search_results = ' . $result_count . ';', array('type' => 'inline', 'group' => JS_LIBRARY-1)); } /** Loading Loading
matomo.module +2 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,8 @@ function matomo_preprocess_search_results(&$variables) { // found. But the pager item mumber can tell the number of search results. global $pager_total_items; drupal_add_js('window.matomo_search_results = ' . intval($pager_total_items[0]) . ';', array('type' => 'inline', 'group' => JS_LIBRARY-1)); $result_count = isset($pager_total_items) ? intval($pager_total_items[0]) : 0; drupal_add_js('window.matomo_search_results = ' . $result_count . ';', array('type' => 'inline', 'group' => JS_LIBRARY-1)); } /** Loading