diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/CategoryCid.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/CategoryCid.php index ec878e7..7387dd2 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/CategoryCid.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/CategoryCid.php @@ -26,13 +26,11 @@ class CategoryCid extends Numeric { * Overrides \Drupal\views\Plugin\views\argument\Numeric::title_query(). */ function title_query() { - $titles = array(); + $titles = db_query("SELECT title FROM {aggregator_category} where cid IN (:cid)", array(':cid' => $this->value))->fetchCol(); - $result = db_query("SELECT title FROM {aggregator_category} where cid IN (:cid)", array(':cid' => $this->value))->fetchCol(); - foreach ($result as $category) { - $titles[] = check_plain($category->title); - } - return $titles; + return array_map(function ($title) { + return check_plain($title); + }, $titles); } } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php index da5b16d..13a90b5 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/row/Rss.php @@ -95,9 +95,11 @@ function render($row) { ), ); - foreach ($entity->elements as $element) { - if (isset($element['namespace'])) { - $this->view->style_plugin->namespaces = array_merge($this->view->style_plugin->namespaces, $element['namespace']); + if (isset($entity->elements)) { + foreach ($entity->elements as $element) { + if (isset($element['namespace'])) { + $this->view->style_plugin->namespaces = array_merge($this->view->style_plugin->namespaces, $element['namespace']); + } } }