From 9af89a0e0e6786e121e91da0059623f5d998faf9 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 12 Mar 2015 23:57:25 +0100 Subject: [PATCH] make sure the status array has 'repeated' key I think the event handler should be doublechecked on more than one point. For example the call arguments don't seem to include an array argument which can include an option called "include_user". Also the $scoped value is not necessarily always a Profile, it can be null too. --- QvitterPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QvitterPlugin.php b/QvitterPlugin.php index ae913d5..d2a9dea 100644 --- a/QvitterPlugin.php +++ b/QvitterPlugin.php @@ -481,7 +481,7 @@ class QvitterPlugin extends Plugin { $twitter_status['statusnet_in_groups'] = $group_addressees; // include the repeat-id, which we need when unrepeating later - if($twitter_status['repeated'] === true) { + if(array_key_exists('repeated', $twitter_status) && $twitter_status['repeated'] === true) { $repeated = Notice::pkeyGet(array('profile_id' => $scoped->id, 'repeat_of' => $notice->id)); $twitter_status['repeated_id'] = $repeated->id;