From 5a235ffbf905fe16105b5ecf9db3a040f04034b2 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 12 Mar 2015 21:53:44 +0100 Subject: [PATCH] Event fixes for activityhandlerplugin --- classes/Notice.php | 2 +- lib/activityhandlerplugin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Notice.php b/classes/Notice.php index 24a4c88d90..1b2b631b04 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -913,7 +913,7 @@ class Notice extends Managed_DataObject $object = null; Event::handle('StoreActivityObject', array($act, $stored, $options, &$object)); if (empty($object)) { - throw new ServerException('No object from StoreActivityObject '.$stored->uri . ': '.$act->asString()); + throw new ServerException('Unsuccessful call to StoreActivityObject '.$stored->uri . ': '.$act->asString()); } $stored->object_type = ActivityUtils::resolveUri($object->getObjectType(), true); $stored->update($orig); diff --git a/lib/activityhandlerplugin.php b/lib/activityhandlerplugin.php index f1ea953f44..19e4dc27b0 100644 --- a/lib/activityhandlerplugin.php +++ b/lib/activityhandlerplugin.php @@ -175,7 +175,7 @@ abstract class ActivityHandlerPlugin extends Plugin * This usually gets called from Notice::saveActivity after a Notice object has been created, * so it contains a proper id and a uri for the object to be saved. */ - public function onStoreActivityObject(Activity $act, Notice $stored, array $options=array(), &$object) { + public function onStoreActivityObject(Activity $act, Notice $stored, array $options, &$object) { // $this->oldSaveNew is there during a migration period of plugins, to start using // Notice::saveActivity instead of Notice::saveNew if (!$this->isMyActivity($act) || isset($this->oldSaveNew)) {