]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Merge pull request #11753 from Quix0r/fixes/missing-contact-array
[friendica.git] / src / Protocol / OStatus.php
index be86c13be7eafc02981b0ea231f52452b1f1ae07..1efbb0bf39a610f50883773d1b7520ea285bf116 100644 (file)
@@ -1168,7 +1168,7 @@ class OStatus
                                                break;
 
                                        default:
-                                               Logger::warning('Unsupported rel=' . $attribute['rel'] . ', href=' . $attribute['href'] . ', object-type=' . $attribute['object-type']);
+                                               Logger::warning('Unsupported rel=' . $attribute['rel'] . ', href=' . $attribute['href'] . ', object-type=' . $item['object-type']);
                                }
                        }
                }
@@ -1211,7 +1211,7 @@ class OStatus
         * Cleans the body of a post if it contains picture links
         *
         * @param string $body The body
-        * @param integer $uriid URI id
+        * @param integer $uriId
         * @return string The cleaned body
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         */
@@ -1377,7 +1377,7 @@ class OStatus
                        case 'photo':
                                if (!empty($siteinfo['image'])) {
                                        $imgdata = Images::getInfoFromURLCached($siteinfo['image']);
-                                       if (!empty($imgdata)) {
+                                       if ($imgdata) {
                                                $attributes = [
                                                        'rel' => 'enclosure',
                                                        'href' => $siteinfo['image'],
@@ -1401,13 +1401,13 @@ class OStatus
                                break;
 
                        default:
-                               Logger::warning('Unsupported type', ['type' => $siteinfo['type'], 'url' => $siteinfo['url']]);
+                               Logger::warning('Unsupported type', ['type' => $siteinfo['type'], 'url' => $siteinfo['url'] ?? '']);
                                break;
                }
 
                if (!DI::config()->get('system', 'ostatus_not_attach_preview') && ($siteinfo['type'] != 'photo') && isset($siteinfo['image'])) {
                        $imgdata = Images::getInfoFromURLCached($siteinfo['image']);
-                       if (!empty($imgdata)) {
+                       if ($imgdata) {
                                $attributes = [
                                        'rel' => 'enclosure',
                                        'href' => $siteinfo['image'],
@@ -2017,7 +2017,7 @@ class OStatus
         * cache or it is empty
         *
         * @param string  $owner_nick  Nickname of the feed owner
-        * @param string  $last_update Date of the last update
+        * @param string  $last_update Date of the last update (in "Y-m-d H:i:s" format)
         * @param integer $max_items   Number of maximum items to fetch
         * @param string  $filter      Feed items filter (activity, posts or comments)
         * @param boolean $nocache     Wether to bypass caching