From a956de78b9681f55cfc81785306031aa6e3ac9c1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 21 Apr 2003 14:55:03 +0000 Subject: - Fixed some PHP "notices". --- modules/blog/blog.module | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/blog/blog.module') diff --git a/modules/blog/blog.module b/modules/blog/blog.module index 7f8b04f1d..dc90b99cd 100644 --- a/modules/blog/blog.module +++ b/modules/blog/blog.module @@ -51,12 +51,14 @@ function blog_head($main = 0) { $mod = arg(0); $id = arg(1); + $output = array(); + if ($mod == "blog" && $id) { $account = user_load(array("uid" => $id)); $output[] = "name. "'s blog\" href=\"". url("blog/view/$id") ."\" />"; } - return $output ? $output : array(); + return $output; } function blog_user($type, &$edit, &$user) { @@ -208,6 +210,8 @@ function blog_page() { function blog_link($type, $node = 0, $main) { global $user; + $links = array(); + if ($type == "page" && user_access("access content")) { $links[] = l(t("user blogs"), "blog", array("title" => t("Read the latest blog entries."))); } @@ -231,7 +235,7 @@ function blog_link($type, $node = 0, $main) { } } - return $links ? $links : array(); + return $links; } function blog_block($op = "list", $delta = 0) { -- cgit v1.2.3