Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make sure the parameters are always an array
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Feb 8, 2019
commit e4d3c299b67dae8560878def28accf35a21bd96f
4 changes: 2 additions & 2 deletions lib/GroupHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ protected function arrayToEvent(array $row) {
->setAffectedUser((string) $row['affecteduser'])
->setAuthor((string) $row['user'])
->setTimestamp((int) $row['timestamp'])
->setSubject((string) $row['subject'], json_decode($row['subjectparams'], true))
->setMessage((string) $row['message'], json_decode($row['messageparams'], true))
->setSubject((string) $row['subject'], (array) json_decode($row['subjectparams'], true))
->setMessage((string) $row['message'], (array) json_decode($row['messageparams'], true))
->setObject((string) $row['object_type'], (int) $row['object_id'], (string) $row['file'])
->setLink((string) $row['link']);

Expand Down
6 changes: 3 additions & 3 deletions lib/MailQueueHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,10 @@ protected function sendEmailToUser($userName, $email, $lang, $timezone, $maxTime
foreach ($mailData as $activity) {
$event = $this->activityManager->generateEvent();
try {
$event->setApp($activity['amq_appid'])
->setType($activity['amq_type'])
$event->setApp((string) $activity['amq_appid'])
->setType((string) $activity['amq_type'])
->setTimestamp((int) $activity['amq_timestamp'])
->setSubject($activity['amq_subject'], json_decode($activity['amq_subjectparams'], true));
->setSubject((string) $activity['amq_subject'], (array) json_decode($activity['amq_subjectparams'], true));
} catch (\InvalidArgumentException $e) {
continue;
}
Expand Down