Commit 223744e8 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#201534 by Lynn, Pasqualle: fix notice in node_forms() when there are no node types defined

parent dfe12251
...@@ -2338,8 +2338,11 @@ function node_content_form($node, $form_state) { ...@@ -2338,8 +2338,11 @@ function node_content_form($node, $form_state) {
* Implementation of hook_forms(). All node forms share the same form handler * Implementation of hook_forms(). All node forms share the same form handler
*/ */
function node_forms() { function node_forms() {
foreach (array_keys(node_get_types()) as $type) { $forms = array();
$forms[$type .'_node_form']['callback'] = 'node_form'; if ($types = node_get_types()) {
foreach (array_keys($types) as $type) {
$forms[$type .'_node_form']['callback'] = 'node_form';
}
} }
return $forms; return $forms;
} }
......
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