issue 1544 check null value

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10428 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2012-03-14 01:27:33 +00:00
parent e2e874664e
commit 9453348cb1
2 changed files with 4 additions and 1 deletions

View file

@ -171,6 +171,10 @@
$news[] = $obj;
}
Context::set('news', $news);
if(isset($news) && is_array($news))
{
Context::set('latestVersion', array_shift($news));
}
}
Context::set('released_version', $buff->zbxe_news->attrs->released_version);
Context::set('download_link', $buff->zbxe_news->attrs->download_link);

View file

@ -3,7 +3,6 @@
<p class="power">
Powered by <strong><a href="{_XE_LOCATION_SITE_}" target="_blank">XE</a></strong>. <span class="vr">|</span>
<strong>Your version</strong>: {__XE_VERSION__} <span class="vr">|</span>
{@$latestVersion = array_shift($news)}
<!--@if(isset($latestVersion))--><strong>Latest version</strong>: <a href="{$latestVersion->url}" target="_blank" title="{zdate($latestVersion->date, 'Y-m-d')}">{$latestVersion->title}</a><!--@end-->
</p>
<p class="cache">