From c0f03889c534309b9987b3deff835f3cada04b4a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 6 Oct 2021 12:07:16 -0400 Subject: [PATCH] Pass correct hook data for support_follow and support_revoke_follow --- src/Core/Protocol.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Core/Protocol.php b/src/Core/Protocol.php index a01e632bf..8583ac243 100644 --- a/src/Core/Protocol.php +++ b/src/Core/Protocol.php @@ -84,10 +84,13 @@ class Protocol return true; } - $result = null; - Hook::callAll('support_follow', $result); + $hook_data = [ + 'protocol' => $protocol, + 'result' => null + ]; + Hook::callAll('support_follow', $hook_data); - return $result === true; + return $hook_data['result'] === true; } /** @@ -103,10 +106,13 @@ class Protocol return true; } - $result = null; - Hook::callAll('support_revoke_follow', $result); + $hook_data = [ + 'protocol' => $protocol, + 'result' => null + ]; + Hook::callAll('support_revoke_follow', $hook_data); - return $result === true; + return $hook_data['result'] === true; } /**