From: Mikael Nordfeldth Date: Thu, 12 Mar 2015 20:53:44 +0000 (+0100) Subject: Event fixes for activityhandlerplugin X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5a235ffbf905fe16105b5ecf9db3a040f04034b2;p=quix0rs-gnu-social.git Event fixes for activityhandlerplugin --- 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)) {