]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/NotificationsManager.php
Avoid memory issue in exception
[friendica.git] / src / Core / NotificationsManager.php
index 2687719472f643e561100ef029cd8493a3bfa2f7..d582f21596688c16145ee28ee9cc3ec5c2a79de6 100644 (file)
@@ -9,8 +9,6 @@ namespace Friendica\Core;
 use Friendica\BaseObject;
 use Friendica\Content\Text\BBCode;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Logger;
-use Friendica\Core\Protocol;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\Item;
@@ -132,6 +130,7 @@ class NotificationsManager extends BaseObject
         * @param array $note note array
         * @param bool  $seen optional true or false, default true
         * @return bool true on success, false on errors
+        * @throws \Exception
         */
        public function setSeen($note, $seen = true)
        {
@@ -150,6 +149,7 @@ class NotificationsManager extends BaseObject
         *
         * @param bool $seen optional true or false. default true
         * @return bool true on success, false on error
+        * @throws \Exception
         */
        public function setAllSeen($seen = true)
        {
@@ -229,7 +229,6 @@ class NotificationsManager extends BaseObject
         */
        private function formatNotifs(array $notifs, $ident = "")
        {
-               $notif = [];
                $arr = [];
 
                if (DBA::isResult($notifs)) {
@@ -638,6 +637,8 @@ class NotificationsManager extends BaseObject
        {
                $knowyou = '';
 
+               $arr = [];
+
                foreach ($intros as $it) {
                        // There are two kind of introduction. Contacts suggested by other contacts and normal connection requests.
                        // We have to distinguish between these two because they use different data.