summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-01-08 05:47:57 +0000
committerDries Buytaert <dries@buytaert.net>2003-01-08 05:47:57 +0000
commit28aa217f901df33f451c988e0e7877fb91ed0b41 (patch)
tree21c5b54ccad1fe86d64fa09eb14afa702e52af55
parentaffacdf508a3b5cc7f671a1c1252f63a2d2ac934 (diff)
downloadbrdo-28aa217f901df33f451c988e0e7877fb91ed0b41.tar.gz
brdo-28aa217f901df33f451c988e0e7877fb91ed0b41.tar.bz2
- 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.
-rw-r--r--includes/common.inc5
1 files changed, 4 insertions, 1 deletions
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[] = "<a href=\"index.php\" title=\"". t("Return to the main page.") ."\">". t("home") ."</a>";
+
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() {