From 9986cb36b5cedc45b8ccfc9db8f4afa1d3a36675 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 2 Jul 2004 18:46:42 +0000 Subject: - Patch #8973 by JonBob: Drupal contains many undefined variables and array indices, which makes PHP throw a lot of warnings when the reporting level is set to E_ALL. Things run fine with these warnings, but as a matter of code style if nothing else we should probably strive to avoid them. The attached fixes most of the more egregious offenders (about 95% of the warnings when I load /node on my test site). --- modules/node/node.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index 3ea1aa664..7ec3e4c1e 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -620,7 +620,7 @@ function node_link($type, $node = 0, $main = 0) { $links = array(); if ($type == 'node') { - if ($node->links) { + if (array_key_exists('links', $node)) { $links = $node->links; } -- cgit v1.2.3