svn: /web/php/trunk/include/ layout.inc
| From: | Sean Coates | Date: | Sat, 31 Oct 2009 18:21:50 +0000 |
| Subject: | svn: /web/php/trunk/include/ layout.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-6307@lists.php.net to get a copy of this message | ||
sean Sat, 31 Oct 2009 18:21:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=290112
Log:
default to empty array (if no news)
Changed paths:
U web/php/trunk/include/layout.inc
Modified: web/php/trunk/include/layout.inc
===================================================================
--- web/php/trunk/include/layout.inc 2009-10-31 18:19:21 UTC (rev 290111)
+++ web/php/trunk/include/layout.inc 2009-10-31 18:21:50 UTC (rev 290112)
@@ -678,6 +678,7 @@
// Print news
function print_news($news, $dog, $max = 5, $onlyyear = null) {
$count = 0;
+ $news = $news ? $news : array(); // default to empty array (if no news)
foreach($news as $item) {
$vevent = "";
$ok = false;