summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-12-14 13:26:39 +0000
committerDries Buytaert <dries@buytaert.net>2005-12-14 13:26:39 +0000
commitc11080c02ec8f448dd3b1be8e03a74dc5ecc6953 (patch)
tree602bbec5ec98e21cada96e7f116fd069cef1be6f /modules
parentc0a43c50dcbb4ddc11c454832b31abed40370e7c (diff)
downloadbrdo-c11080c02ec8f448dd3b1be8e03a74dc5ecc6953.tar.gz
brdo-c11080c02ec8f448dd3b1be8e03a74dc5ecc6953.tar.bz2
- Patch #41109 by chx: fixed problem with _node_name() returning NULL instead of array() when there are no node types.
Diffstat (limited to 'modules')
-rw-r--r--modules/node.module5
-rw-r--r--modules/node/node.module5
2 files changed, 6 insertions, 4 deletions
diff --git a/modules/node.module b/modules/node.module
index d7a40d60f..476495634 100644
--- a/modules/node.module
+++ b/modules/node.module
@@ -196,9 +196,10 @@ function node_teaser($body, $format = NULL) {
}
function _node_names($op = '', $node = NULL) {
- static $node_names, $node_list;
+ static $node_names = array();
+ static $node_list = array();
- if (!isset($node_names)) {
+ if (empty($node_names)) {
$node_names = module_invoke_all('node_info');
foreach ($node_names as $type => $value) {
$node_list[$type] = $value['name'];
diff --git a/modules/node/node.module b/modules/node/node.module
index d7a40d60f..476495634 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -196,9 +196,10 @@ function node_teaser($body, $format = NULL) {
}
function _node_names($op = '', $node = NULL) {
- static $node_names, $node_list;
+ static $node_names = array();
+ static $node_list = array();
- if (!isset($node_names)) {
+ if (empty($node_names)) {
$node_names = module_invoke_all('node_info');
foreach ($node_names as $type => $value) {
$node_list[$type] = $value['name'];