Commit 46913a7e authored by Dries's avatar Dries

- Patch #45259 by chx/drumm: cast to object required.

parent 186ebd18
......@@ -1602,8 +1602,9 @@ function node_object_prepare(&$node) {
* Generate the node editing form.
*/
function node_form($node) {
$node = (object)$node;
$form = node_form_array($node);
return drupal_get_form($node->type . '_node_form', $form, 'node_form');
return drupal_get_form($node->type .'_node_form', $form, 'node_form');
}
/**
......@@ -1612,7 +1613,6 @@ function node_form($node) {
function node_form_array($node) {
$op = isset($_POST['op']) ? $_POST['op'] : '';
$node = (object)$node;
node_object_prepare($node);
// Set the id of the top-level form tag
......
......@@ -1602,8 +1602,9 @@ function node_object_prepare(&$node) {
* Generate the node editing form.
*/
function node_form($node) {
$node = (object)$node;
$form = node_form_array($node);
return drupal_get_form($node->type . '_node_form', $form, 'node_form');
return drupal_get_form($node->type .'_node_form', $form, 'node_form');
}
/**
......@@ -1612,7 +1613,6 @@ function node_form($node) {
function node_form_array($node) {
$op = isset($_POST['op']) ? $_POST['op'] : '';
$node = (object)$node;
node_object_prepare($node);
// Set the id of the top-level form tag
......
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