]> git.mxchange.org Git - friendica.git/commitdiff
Fix fatal errors because of unknown function/variable names
authorMichael <heluecht@pirati.ca>
Mon, 28 Nov 2022 21:22:21 +0000 (21:22 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 28 Nov 2022 21:22:21 +0000 (21:22 +0000)
src/Object/Post.php

index 8b8463f8587fe5417e1ac17ed13b610cfb0ef5c5..c81b49580f5b9d0c42be239d2858aab9e4b5529a 100644 (file)
@@ -622,7 +622,7 @@ class Post
        public function addChild(Post $item)
        {
                if (!$item->getId()) {
-                       Logger::fatal('Post object has no id', ['post' => $item]);
+                       Logger::error('Post object has no id', ['post' => $item]);
                        return false;
                } elseif ($this->getChild($item->getId())) {
                        Logger::warning('Post object already exists', ['post' => $item]);
@@ -633,7 +633,7 @@ class Post
                 * Only add what will be displayed
                 */
                if ($item->getDataValue('network') === Protocol::MAIL && DI::userSession()->getLocalUserId() != $item->getDataValue('uid')) {
-                       Logger::warning('Post object does not belong to local user', ['post' => $item, 'local_user' => $local_user]);
+                       Logger::warning('Post object does not belong to local user', ['post' => $item, 'local_user' => DI::userSession()->getLocalUserId()]);
                        return false;
                } elseif (DI::activity()->match($item->getDataValue('verb'), Activity::LIKE) ||
                          DI::activity()->match($item->getDataValue('verb'), Activity::DISLIKE)) {