Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
cdb6aa72
Commit
cdb6aa72
authored
Aug 25, 2004
by
Steven Wittens
Browse files
-
#10342
: PHP5 fix with undefined array.
parent
674e2f49
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/node.module
View file @
cdb6aa72
...
...
@@ -1127,6 +1127,7 @@ function node_form($edit) {
// Get the node-specific bits.
// We can't use node_invoke() because $param must be passed by reference.
$function
=
node_get_module_name
(
$edit
)
.
'_form'
;
$param
=
array
();
if
(
function_exists
(
$function
))
{
$form
.
=
$function
(
$edit
,
$param
);
}
...
...
@@ -1139,7 +1140,7 @@ function node_form($edit) {
// Add hidden 'op' variable, which specifies the default operation (Preview).
$output
.
=
'<input type="hidden" name="op" value="'
.
check_form
(
t
(
'Preview'
))
.
"
\"
/>
\n
"
;
// Add the admin-specific parts
/
// Add the admin-specific parts
.
if
(
user_access
(
'administer nodes'
))
{
$output
.
=
'<div class="admin">'
;
...
...
@@ -1218,7 +1219,12 @@ function node_form($edit) {
$extra
=
node_invoke_nodeapi
(
$edit
,
'form param'
);
foreach
(
$extra
as
$key
=>
$value
)
{
if
(
is_array
(
$value
))
{
$param
[
$key
]
=
array_merge
(
$param
[
$key
],
$value
);
if
(
isset
(
$param
[
$key
]))
{
$param
[
$key
]
=
array_merge
(
$param
[
$key
],
$value
);
}
else
{
$param
[
$key
]
=
$value
;
}
}
else
{
$param
[
$key
]
=
$value
;
...
...
modules/node/node.module
View file @
cdb6aa72
...
...
@@ -1127,6 +1127,7 @@ function node_form($edit) {
// Get the node-specific bits.
// We can't use node_invoke() because $param must be passed by reference.
$function
=
node_get_module_name
(
$edit
)
.
'_form'
;
$param
=
array
();
if
(
function_exists
(
$function
))
{
$form
.
=
$function
(
$edit
,
$param
);
}
...
...
@@ -1139,7 +1140,7 @@ function node_form($edit) {
// Add hidden 'op' variable, which specifies the default operation (Preview).
$output
.
=
'<input type="hidden" name="op" value="'
.
check_form
(
t
(
'Preview'
))
.
"
\"
/>
\n
"
;
// Add the admin-specific parts
/
// Add the admin-specific parts
.
if
(
user_access
(
'administer nodes'
))
{
$output
.
=
'<div class="admin">'
;
...
...
@@ -1218,7 +1219,12 @@ function node_form($edit) {
$extra
=
node_invoke_nodeapi
(
$edit
,
'form param'
);
foreach
(
$extra
as
$key
=>
$value
)
{
if
(
is_array
(
$value
))
{
$param
[
$key
]
=
array_merge
(
$param
[
$key
],
$value
);
if
(
isset
(
$param
[
$key
]))
{
$param
[
$key
]
=
array_merge
(
$param
[
$key
],
$value
);
}
else
{
$param
[
$key
]
=
$value
;
}
}
else
{
$param
[
$key
]
=
$value
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment