]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #5711 from annando/and-again
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sun, 2 Sep 2018 12:48:47 +0000 (14:48 +0200)
committerGitHub <noreply@github.com>
Sun, 2 Sep 2018 12:48:47 +0000 (14:48 +0200)
The days are getting shorter, like the list of removed notices ...

include/api.php
mod/notifications.php
mod/ping.php
src/Model/Profile.php

index f40674b8941968a3e351dcc43981f98deed32b95..3bae11e57d87221977c24cadfb0a21321544e367 100644 (file)
@@ -581,7 +581,10 @@ function api_get_user(App $a, $contact_id = null)
        if (is_null($user) && ($a->argc > (count($called_api) - 1)) && (count($called_api) > 0)) {
                $argid = count($called_api);
                if (!empty($a->argv[$argid])) {
-                       list($user, $null) = explode(".", $a->argv[$argid]);
+                       $data = explode(".", $a->argv[$argid]);
+                       if (count($data) > 1) {
+                               list($user, $null) = $data;
+                       }
                }
                if (is_numeric($user)) {
                        $user = DBA::escape(api_unique_id_to_nurl(intval($user)));
@@ -4396,7 +4399,7 @@ function save_media_to_database($mediatype, $media, $type, $album, $allow_cid, $
        if ($filetype == "") {
                $filetype=Image::guessType($filename);
        }
-       $imagedata = getimagesize($src);
+       $imagedata = @getimagesize($src);
        if ($imagedata) {
                $filetype = $imagedata['mime'];
        }
index 145c38435017b0d9a5c1003ffa6fa65e2016a4d6..bc581b6dd34ef24cda3791cb2ae9bc8f36e3914c 100644 (file)
@@ -115,7 +115,6 @@ function notifications_content(App $a)
        } elseif (($a->argc > 1) && ($a->argv[1] == 'home')) {
                $notif_header = L10n::t('Home Notifications');
                $notifs = $nm->homeNotifs($show, $startrec, $perpage);
-
        }
 
 
@@ -134,7 +133,7 @@ function notifications_content(App $a)
        $notif_tpl = get_markup_template('notifications.tpl');
 
        if (!isset($notifs['ident'])) {
-               logger('Missing data in notifs: ' . System::callstack(20), LOGGER_DEBUG);
+               logger('Missing data in notifs: ' . json_encode($a->argv), LOGGER_DEBUG);
        }
 
        // Process the data for template creation
index 99ebde70c183a2367d8a19406b51436e66a95748..9867f03f9afd1eb4b96877ec237dafa2560c3334 100644 (file)
@@ -519,7 +519,7 @@ function ping_get_notifications($uid)
  * @param int   $forums_unseen Number of unseen forum items
  * @return array XML-transform ready data array
  */
-function ping_format_xml_data($data, $sysnotify, $notifs, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen)
+function ping_format_xml_data($data, $sysnotify_count, $notifs, $sysmsgs, $sysmsgs_info, $groups_unseen, $forums_unseen)
 {
        $notifications = [];
        foreach ($notifs as $key => $notif) {
index f6e116fa79867b94a9cbb58d5bc0541446898155..29bc7e680d1bbd3d7240c1af30de1997d6271575 100644 (file)
@@ -492,7 +492,7 @@ class Profile
 
                if (isset($p['address'])) {
                        $p['address'] = BBCode::convert($p['address']);
-               } else {
+               } elseif (isset($p['location'])) {
                        $p['address'] = BBCode::convert($p['location']);
                }