commit 1f2da3384e816000eac6acc1bace998c3b385287
Author: Dharmend <Dharmend@1487144.no-reply.drupal.org>
Date:   Wed Feb 1 20:59:12 2023 +0530

    fix the error

diff --git a/html_titles.module b/html_titles.module
index d1f83e6..553dcbc 100755
--- a/html_titles.module
+++ b/html_titles.module
@@ -46,7 +46,7 @@ function html_titles_preprocess_block(&$variables) {
  */
 function html_titles_preprocess_page_title(&$variables) {
   $current_path = \Drupal::service('path.current')->getPath();
-  if (strpos($current_path, 'term') !== FALSE) {
+  if (strpos($current_path, 'term') !== FALSE && is_array($variables['title'])) {
     if (array_key_exists('#markup', $variables['title'])) {
       $variables['title']['#markup'] = Markup::create(htmlspecialchars_decode($variables['title']['#markup']));
     }
