Commit b4520177 authored by Gábor Hojtsy's avatar Gábor Hojtsy

#207990 by soxofaan: fix notice on node/add page for anonymous users

parent 550b9255
...@@ -52,7 +52,7 @@ function node_add($type) { ...@@ -52,7 +52,7 @@ function node_add($type) {
// If a node type has been specified, validate its existence. // If a node type has been specified, validate its existence.
if (isset($types[$type]) && node_access('create', $type)) { if (isset($types[$type]) && node_access('create', $type)) {
// Initialize settings: // Initialize settings:
$node = array('uid' => $user->uid, 'name' => $user->name, 'type' => $type, 'language' => ''); $node = array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');
drupal_set_title(t('Create @name', array('@name' => $types[$type]->name))); drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));
$output = drupal_get_form($type .'_node_form', $node); $output = drupal_get_form($type .'_node_form', $node);
......
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