Commit d513d730 authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "Fix warning when trying to render an empty feed"

parents eb00746b b55a5bc9
......@@ -68,8 +68,10 @@ class PluginBlocktypeExternalfeed extends SystemBlocktype {
$data->image = unserialize($data->image);
// only keep the number of entries the user asked for
$chunks = array_chunk($data->content, isset($configdata['count']) ? $configdata['count'] : 10);
$data->content = $chunks[0];
if (count($data->content)) {
$chunks = array_chunk($data->content, isset($configdata['count']) ? $configdata['count'] : 10);
$data->content = $chunks[0];
}
// Attempt to fix relative URLs in the feeds
if (!empty($data->image['link'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment