viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Fix notice SocialComponent, a=chris

Chris Pollett [2020-08-02 03:Aug:nd]
Fix notice SocialComponent, a=chris
Filename
src/controllers/components/SocialComponent.php
diff --git a/src/controllers/components/SocialComponent.php b/src/controllers/components/SocialComponent.php
index e2782f06f..4bbd0e18a 100644
--- a/src/controllers/components/SocialComponent.php
+++ b/src/controllers/components/SocialComponent.php
@@ -1757,16 +1757,17 @@ class SocialComponent extends Component implements CrawlConstants
             if (empty($thread_start_item) ||
                 empty($thread_start_item["TITLE"])) {
                 $data['NO_POSTS_IN_THREAD'] = true;
+            } else {
+                $title = $thread_start_item["TITLE"];
+                $data['SUBTITLE'] = trim($title, "\- \t\n\r\0\x0B");
+                $type = "thread";
+                $type_id = $just_thread;
+                $group = $group_model->getGroupById(
+                    $thread_start_item['GROUP_ID'], $user_id);
+                $data["GROUP_ID"] = $group["GROUP_ID"];
+                $data["GROUP_NAME"] = $group["GROUP_NAME"];
+                $data['GROUP_STATUS'] = $group['STATUS'];
             }
-            $title = $thread_start_item["TITLE"];
-            $data['SUBTITLE'] = trim($title, "\- \t\n\r\0\x0B");
-            $type = "thread";
-            $type_id = $just_thread;
-            $group = $group_model->getGroupById($thread_start_item['GROUP_ID'],
-                $user_id);
-            $data["GROUP_ID"] = $group["GROUP_ID"];
-            $data["GROUP_NAME"] = $group["GROUP_NAME"];
-            $data['GROUP_STATUS'] = $group['STATUS'];
         }
         if (!$just_group_id && !$just_thread) {
            $data['GROUP_STATUS'] = C\ACTIVE_STATUS;
ViewGit