EndSetApiUser is not always a User
GNU social will however make sure that whenever the event is called, User _has_ been set, but for anyone not stalking the nightly branch they will have less messages like this in their PHP error log: PHP Notice: Trying to get property of non-object in [...]/Qvitter/QvitterPlugin.php on line 810
This commit is contained in:
parent
25207c89d1
commit
1d2dbef9fb
|
@ -806,6 +806,9 @@ class QvitterPlugin extends Plugin {
|
|||
* @return boolean hook flag
|
||||
*/
|
||||
public function onEndSetApiUser($user) {
|
||||
if (!$user instanceof User) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$user_id = $user->id;
|
||||
$notification = new QvitterNotification();
|
||||
|
|
Loading…
Reference in New Issue
Block a user