Commit c11080c0 authored by Dries's avatar Dries

- Patch #41109 by chx: fixed problem with _node_name() returning NULL instead...

- Patch #41109 by chx: fixed problem with _node_name() returning NULL instead of array() when there are no node types.
parent c0a43c50
......@@ -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'];
......
......@@ -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'];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment