array_merge() on comment submit

xybermatthew - February 10, 2007 - 09:18
Project:Drupal
Version:5.1
Component:base system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I get this error message (three times in a row on the same page) when trying to submit a comment.

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mattnli/public_html/drupal/includes/common.inc on line 1929.
warning: Invalid argument supplied for foreach() in /home/mattnli/public_html/drupal/includes/common.inc on line 1962.

I am running drupal 5.1 on php 5.1.4 with mysql 4.1.21.

I know its a php 5 issue, something about casting the array (e.g., (array)), but I just don't know which drupal file to modify. I've tried changing the menu.inc...

/*from this...*/
/*$arguments = array_merge($arguments, explode('/', $arg));*/
/*to this...*/
$arguments = array_merge((array)$arguments, (array)explode('/', $arg));

/*from this...*/
/*$children = array_merge($children, _menu_build_visible_tree($mid));*/
/*to this...*/
$children = array_merge((array)$children, (array)_menu_build_visible_tree($mid));

and the theme.inc...

/*from this...*/
/*$settings = array_merge($defaults, variable_get('theme_settings', array()));*/
/*to this...*/
$settings = array_merge($defaults, (array)variable_get('theme_settings', array()));

Any clues or ideas?

 
 

Drupal is a registered trademark of Dries Buytaert.