fix: Only try to look for feed correlations for a proposal if the proposal list isn't empty

pull/2428/head
iglocska 2017-08-25 16:43:28 +02:00
parent 8725821a5a
commit 360b2df9bc
1 changed files with 1 additions and 1 deletions

View File

@ -1555,7 +1555,7 @@ class Event extends AppModel {
}
$event['Attribute'] = array_values($event['Attribute']);
}
if (isset($event['ShadowAttribute'])) {
if (!empty($event['ShadowAttribute'])) {
if ($isSiteAdmin && isset($options['includeFeedCorrelations']) && $options['includeFeedCorrelations']) {
$this->Feed = ClassRegistry::init('Feed');
$event['ShadowAttribute'] = $this->Feed->attachFeedCorrelations($event['ShadowAttribute'], $user);