From 28aa217f901df33f451c988e0e7877fb91ed0b41 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 8 Jan 2003 05:47:57 +0000 Subject: - Made sure the $links array is properly initialized before doing an array_merge. According to Ori, this fixes a problem when using PHP as an ISAPI module with the Sambar server. --- includes/common.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'includes/common.inc') diff --git a/includes/common.inc b/includes/common.inc index 611dc72c4..febc9587b 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -799,6 +799,7 @@ function link_page() { } else { $links[] = "". t("home") .""; + foreach (module_list() as $name) { if (module_hook($name, "link")) { $links = array_merge($links, module_invoke($name, "link", "page")); @@ -810,13 +811,15 @@ function link_page() { } function link_node($node, $main = 0) { + $links = array(); + foreach (module_list() as $name) { if (module_hook($name, "link")) { $links = array_merge($links, module_invoke($name, "link", "node", $node, $main)); } } - return $links ? $links : array(); + return $links; } function timer_start() { -- cgit v1.2.3