Merge pull request #10840 from MrPetovan/bug/fatal-errors

Pass correct hook data for support_follow and support_revoke_follow
This commit is contained in:
Tobias Diekershoff 2021-10-06 18:52:57 +02:00 committed by GitHub
commit f44443d960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -84,10 +84,13 @@ class Protocol
return true; return true;
} }
$result = null; $hook_data = [
Hook::callAll('support_follow', $result); '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; return true;
} }
$result = null; $hook_data = [
Hook::callAll('support_revoke_follow', $result); 'protocol' => $protocol,
'result' => null
];
Hook::callAll('support_revoke_follow', $hook_data);
return $result === true; return $hook_data['result'] === true;
} }
/** /**