]> 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 Haeder <roland@mxchange.org>
Thu, 18 Sep 2014 22:43:52 +0000 (00:43 +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 6a58c74559308b41c42d7d09506b25fbd1d78121..d86ffdfcdb8514e8132ac61bf44da2411b2a4137 100644 (file)
@@ -230,6 +230,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 d4c01232ec283e8e97ae5d54dcb96040de37df60..a0fc4872328e0f5103aea0797727098e9f5196db 100644 (file)
@@ -300,7 +300,7 @@ class ActivityUtils
         return false;
     }
 
-    static function getFeedAuthor($feedEl)
+    static function getFeedAuthor(DOMElement $feedEl)
     {
         // Try old and deprecated activity:subject
 
@@ -347,10 +347,10 @@ class ActivityUtils
         return null;
     }
 
-    static function compareTypes($type, $objects)    // this does verbs too!
+    static function compareTypes($type, array $objects)    // this does verbs too!
     {
         $type = self::resolveUri($type);
-        foreach ((array)$objects as $object) {
+        foreach ($objects as $object) {
             if ($type === self::resolveUri($object)) {
                 return true;
             }
index 3e9c4828fb5584e3d077d6e6d5b4fd626bdb352c..964580cf49a208b8e2129857f8cc20a78587d468 100644 (file)
@@ -146,14 +146,14 @@ class OStatusQueueHandler extends QueueHandler
         $this->pushFeed($feed, array($this, 'peopletagFeedForNotice'), $ptag);
     }
 
-    function pingReply($oprofile)
+    function pingReply(OStatus_profile $oprofile)
     {
         if ($this->user) {
             // For local posts, send a Salmon ping to the mentioned
             // 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 01116bb6f4d50d7b08c66cb9a845997c9d2871d4..9102a0a2cb3b1d2c4e48a963f0e86a6762da27fe 100644 (file)
@@ -118,7 +118,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;