fix: [internal] Variable should be defined all the time

pull/6374/head
Jakub Onderka 2020-10-01 13:54:55 +02:00
parent 1da6cd8cd4
commit 0d62475834
1 changed files with 2 additions and 3 deletions

View File

@ -2155,9 +2155,8 @@ class Event extends AppModel
$this->Feed = ClassRegistry::init('Feed');
}
// Precache current user email
if (!empty($user['id'])) {
$userEmails = array($user['id'] => $user['email']);
}
$userEmails = empty($user['id']) ? [] : [$user['id'] => $user['email']];
// Do some refactoring with the event
$fields = array(
'common' => array('distribution', 'sharing_group_id', 'uuid'),