]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fixed:
authorRoland Haeder <roland@mxchange.org>
Thu, 18 Sep 2014 22:43:52 +0000 (00:43 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 29 Mar 2020 22:20:31 +0000 (00:20 +0200)
-----------------------------
Argument 2 passed to Ostatus_profile::notifyDeferred() must be an
instance of Profile, instance of User given, called in
/var/www/htdocs/plugins/OStatus/lib/ostatusqueuehandler.php on line 156 and
defined (/var/www/htdocs/plugins/OStatus/classes/Ostatus_profile.php:363)
[ABORT]
-----------------------------
getProfile() must be called on this->user

Plus fixed/added some type-hints.

Signed-off-by: Roland Haeder <roland@mxchange.org>
classes/Avatar.php
lib/activityutils.php
plugins/OStatus/lib/ostatusqueuehandler.php
plugins/OStatus/scripts/update_ostatus_profiles.php

index 5557533ed0caa8c15306658e7c4765caa1762fb7..2dd481ae7314b154a16b07b88d5913b1ee886fe5 100644 (file)
@@ -203,6 +203,12 @@ class Avatar extends Managed_DataObject
         try {
             return self::byProfile($target,  $width, $height)->displayUrl();
         } catch (Exception $e) {
+            common_debug(sprintf('target=>id=%s,width=%s,height=%s,message=%s',
+                $target->id,
+                $width,
+                $height,
+                $e->getMessage()
+            ));
             return self::defaultImage($width);
         }
     }
index b83bc0a238045e2acc6959127fba521e199d4fcd..1ca63e20330fcb07fa8203afece372c997d4ef10 100644 (file)
@@ -354,10 +354,10 @@ class ActivityUtils
         return null;
     }
 
-    static function compareTypes($type, $objects)
+    static function compareTypes($type, array $objects)
     {
         $type = self::resolveUri($type, false);
-        foreach ((array)$objects as $object) {
+        foreach ($objects as $object) {
             if ($type === self::resolveUri($object)) {
                 return true;
             }
index 21a9a37e3ca8fae987b3eb90d31362ab8ebbd7ba..f3e3f808582da93d3b9cf9ea188b6cf5b273a6b9 100644 (file)
@@ -173,7 +173,7 @@ class OStatusQueueHandler extends QueueHandler
             // remote user or group.
             // @fixme as an optimization we can skip this if the
             // remote profile is subscribed to the author.
-            $oprofile->notifyDeferred($this->notice, $this->user);
+            $oprofile->notifyDeferred($this->notice, $this->user->getProfile());
         }
     }
 
index 45ee856264b44938d88f40647b75e615fe790a70..0a7a23e63f6bee768271edb332b39fff1a1d9880 100755 (executable)
@@ -54,7 +54,7 @@ class LooseOstatusProfile extends Ostatus_profile
      * @throws Exception on various error conditions
      * @throws OStatusShadowException if this reference would obscure a local user/group
      */
-    public static function updateProfileURL($profile_url, $hints=array())
+    public static function updateProfileURL($profile_url, array $hints=array())
     {
         $oprofile = null;