X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FSubMirror%2Fclasses%2FSubMirror.php;fp=plugins%2FSubMirror%2Fclasses%2FSubMirror.php;h=0920856192f1487f1516b94d700b19c1e0f2793d;hb=34a6624452e8b7f60b40181441c6ea2c8158379a;hp=7e8d288b61331e69743eb90b571b5ca73ec637a9;hpb=753019baf27281370e91084d3766e59fa80b66f1;p=quix0rs-gnu-social.git diff --git a/plugins/SubMirror/classes/SubMirror.php b/plugins/SubMirror/classes/SubMirror.php index 7e8d288b61..0920856192 100644 --- a/plugins/SubMirror/classes/SubMirror.php +++ b/plugins/SubMirror/classes/SubMirror.php @@ -148,10 +148,10 @@ class SubMirror extends Managed_DataObject * @param Notice $notice * @return mixed Notice on successful mirroring, boolean if not */ - public function mirrorNotice($notice) + public function mirrorNotice(Notice $notice) { $profile = Profile::getKV('id', $this->subscriber); - if (!$profile) { + if (!($profile instanceof Profile)) { common_log(LOG_ERR, "SubMirror plugin skipping auto-repeat of notice $notice->id for missing user $profile->id"); return false; } @@ -172,9 +172,9 @@ class SubMirror extends Managed_DataObject * @param Notice $notice * @return mixed Notice on successful repeat, true if already repeated, false on failure */ - protected function repeatNotice($profile, $notice) + protected function repeatNotice(Profile $profile, Notice $notice) { - if($profile->hasRepeated($notice->id)) { + if($profile->hasRepeated($notice)) { common_log(LOG_INFO, "SubMirror plugin skipping auto-repeat of notice $notice->id for user $profile->id; already repeated."); return true; } else {