From 011c545b90466ac92e66cb3c1464af81c207eaac Mon Sep 17 00:00:00 2001
From: Roland Haeder <roland@mxchange.org>
Date: Thu, 5 Mar 2015 18:43:57 +0100
Subject: [PATCH] $related must contain class names, no table names ("all"
 lower-case) + fixed some checked type-hints.

Again, it must be User_flag_profile (class name), not user_flag_profile (table name).

Signed-off-by: Roland Haeder <roland@mxchange.org>
---
 plugins/DirectMessage/DirectMessagePlugin.php | 2 +-
 plugins/OStatus/OStatusPlugin.php             | 2 +-
 plugins/UserFlag/UserFlagPlugin.php           | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/plugins/DirectMessage/DirectMessagePlugin.php b/plugins/DirectMessage/DirectMessagePlugin.php
index de13ef680f..34533ba9e8 100644
--- a/plugins/DirectMessage/DirectMessagePlugin.php
+++ b/plugins/DirectMessage/DirectMessagePlugin.php
@@ -149,7 +149,7 @@ class DirectMessagePlugin extends Plugin
         return true;
     }
 
-    public function onProfileDeleteRelated(Profile $profile, &$related)
+    public function onProfileDeleteRelated(Profile $profile, array &$related)
     {
         $msg = new Message();
         $msg->from_profile = $profile->id;
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 1cd7deee3c..66c8e47f8c 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -1373,7 +1373,7 @@ class OStatusPlugin extends Plugin
         return true;
     }
 
-    public function onProfileDeleteRelated($profile, &$related)
+    public function onProfileDeleteRelated(Profile $profile, array &$related)
     {
         // Ostatus_profile has a 'profile_id' property, which will be used to find the object
         $related[] = 'Ostatus_profile';
diff --git a/plugins/UserFlag/UserFlagPlugin.php b/plugins/UserFlag/UserFlagPlugin.php
index d2afeaced8..27ebefb053 100644
--- a/plugins/UserFlag/UserFlagPlugin.php
+++ b/plugins/UserFlag/UserFlagPlugin.php
@@ -175,7 +175,7 @@ class UserFlagPlugin extends Plugin
      *
      * @return boolean hook result
      */
-    function onEndBlockProfile($user, $profile)
+    function onEndBlockProfile(User $user, Profile $profile)
     {
         if ($this->flagOnBlock && !User_flag_profile::exists($profile->id,
                                                              $user->id)) {
@@ -196,9 +196,9 @@ class UserFlagPlugin extends Plugin
      *
      * @return boolean hook result
      */
-    function onProfileDeleteRelated($profile, &$related)
+    public function onProfileDeleteRelated(Profile $profile, array &$related)
     {
-        $related[] = 'user_flag_profile';
+        $related[] = 'User_flag_profile';
         return true;
     }
 
-- 
2.39.5