Correctly match the subjects to the parameters

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-11-25 11:45:40 +01:00
parent 9f915e061c
commit f067d0ee66
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
1 changed files with 2 additions and 2 deletions

View File

@ -164,12 +164,12 @@ class Activity implements IProvider {
$parameters = $event->getSubjectParameters(); $parameters = $event->getSubjectParameters();
switch ($subject) { switch ($subject) {
case self::SUBJECT_SHARED_EMAIL_BY: case self::SUBJECT_SHARED_EMAIL_SELF:
return [ return [
'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]), 'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]),
'email' => $this->generateEmailParameter($parameters[1]), 'email' => $this->generateEmailParameter($parameters[1]),
]; ];
case self::SUBJECT_SHARED_EMAIL_SELF: case self::SUBJECT_SHARED_EMAIL_BY:
return [ return [
'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]), 'file' => $this->generateFileParameter((int) $event->getObjectId(), $parameters[0]),
'email' => $this->generateEmailParameter($parameters[1]), 'email' => $this->generateEmailParameter($parameters[1]),