diff --git a/src/Content/ForumManager.php b/src/Content/ForumManager.php index d39ea30294..d0aefd3062 100644 --- a/src/Content/ForumManager.php +++ b/src/Content/ForumManager.php @@ -105,6 +105,8 @@ class ForumManager if (DBA::isResult($contacts)) { $id = 0; + $entries = []; + foreach ($contacts as $contact) { $selected = (($cid == $contact['id']) ? ' forum-selected' : ''); diff --git a/src/Content/Widget/TagCloud.php b/src/Content/Widget/TagCloud.php index f2b94b1114..62301729b7 100644 --- a/src/Content/Widget/TagCloud.php +++ b/src/Content/Widget/TagCloud.php @@ -40,6 +40,7 @@ class TagCloud $contact = DBA::selectFirst('contact', ['url'], ['uid' => $uid, 'self' => true]); $url = System::removedBaseUrl($contact['url']); + $tags = []; foreach ($r as $rr) { $tag['level'] = $rr[2]; $tag['url'] = $url . '?tag=' . urlencode($rr[0]); diff --git a/src/Model/Event.php b/src/Model/Event.php index cd08c314af..3ce86017ba 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -644,15 +644,17 @@ class Event extends BaseObject */ private static function formatListForExport(array $events, $format) { + $o = ''; + if (!count($events)) { - return ''; + return $o; } switch ($format) { // Format the exported data as a CSV file. case "csv": header("Content-type: text/csv"); - $o = '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL; + $o .= '"Subject", "Start Date", "Start Time", "Description", "End Date", "End Time", "Location"' . PHP_EOL; foreach ($events as $event) { /// @todo The time / date entries don't include any information about the diff --git a/src/Model/Term.php b/src/Model/Term.php index 28c28fb1a9..6a213d445b 100644 --- a/src/Model/Term.php +++ b/src/Model/Term.php @@ -274,6 +274,7 @@ class Term 'network' => $item['author-network'], 'url' => $item['author-link']]; $tag['url'] = Contact::magicLinkByContact($author, $tag['url']); + $prefix = ''; if ($tag['type'] == TERM_HASHTAG) { if ($orig_tag != $tag['url']) { $item['body'] = str_replace($orig_tag, $tag['url'], $item['body']); diff --git a/src/Module/Photo.php b/src/Module/Photo.php index 994d0efa61..15ea261fb0 100644 --- a/src/Module/Photo.php +++ b/src/Module/Photo.php @@ -46,28 +46,29 @@ class Photo extends BaseModule } $customsize = 0; + $photo = false; switch($a->argc) { - case 4: - $customsize = intval($a->argv[2]); - $uid = self::stripExtension($a->argv[3]); - $photo = self::getAvatar($uid, $a->argv[1]); - break; - case 3: - $uid = self::stripExtension($a->argv[2]); - $photo = self::getAvatar($uid, $a->argv[1]); - break; - case 2: - $photoid = self::stripExtension($a->argv[1]); - $scale = 0; - if (substr($photoid, -2, 1) == "-") { - $scale = intval(substr($photoid, -1, 1)); - $photoid = substr($photoid, 0, -2); - } - $photo = MPhoto::getPhoto($photoid, $scale); - if ($photo === false) { - $photo = MPhoto::createPhotoForSystemResource("images/nosign.jpg"); - } - break; + case 4: + $customsize = intval($a->argv[2]); + $uid = self::stripExtension($a->argv[3]); + $photo = self::getAvatar($uid, $a->argv[1]); + break; + case 3: + $uid = self::stripExtension($a->argv[2]); + $photo = self::getAvatar($uid, $a->argv[1]); + break; + case 2: + $photoid = self::stripExtension($a->argv[1]); + $scale = 0; + if (substr($photoid, -2, 1) == "-") { + $scale = intval(substr($photoid, -1, 1)); + $photoid = substr($photoid, 0, -2); + } + $photo = MPhoto::getPhoto($photoid, $scale); + if ($photo === false) { + $photo = MPhoto::createPhotoForSystemResource("images/nosign.jpg"); + } + break; } if ($photo === false) {