Commit 98bef197 authored by Ruslan Kabalin's avatar Ruslan Kabalin
Browse files

forum: fixed warning on empty atom feed.



Trying to get property of boolean variable if $postrecords is empty.
Signed-off-by: default avatarRuslan Kabalin <ruslan.kabalin@luns.net.uk>
parent d0babb12
......@@ -164,7 +164,7 @@ $postcount = 20;
$postrecords = get_records_sql_array($sql, array($id, $postcount));
$image = get_config('wwwroot') . 'theme/raw/static/images/site-logo.png';
$updated = $postrecords[0]->ctime;
$updated = ($postrecords) ? atom_date($postrecords[0]->ctime) : '';
$generator = array(
'uri' => 'http://mahara.org',
......@@ -177,7 +177,7 @@ $feed = array(
'link' => $link,
'selflink' => $selflink,
'id' => implode(',', array(get_config('wwwroot'), $feedtype, $id)),
'updated' => atom_date($updated),
'updated' => $updated,
'logo' => $image,
'icon' => get_config('wwwroot') . 'favicon.ico',
'generator' => $generator,
......
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