When I submit a comment using the comment module, it returns a white page in the content area with the following line.
Fatal error: Function name must be a string in /home/vi0jhco3/public_html/horseschoolsonline.com/includes/actions.inc on line 100
the code at line 100
$result[$action_ids] = $function($object, $context, $a1, $a2);
The comment is actually posted ok.
When I navigate back to the home page after the error I get a pink error box in the content view with the following
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/vi0jhco3/public_html/horseschoolsonline.com/includes/actions.inc on line 99.
the code at line 99
$context = array_merge($context, unserialize($action->parameters));
it looks like array_merge is failing because unserialize() is not returning an array.
This did not happen in 6.14
ANY CLUES!!
Comments
Comment #1
sderrick commentedIts a d*** shame when nobody responds to a bug in the core!
Comment #2
sderrick commentedWell I performed Hack surgery on the problem, and it seems to work, though what function is now not being called I can;t tell. The comment is posted.
***was***
else {
// If it's a configurable action, retrieve stored parameters.
if (is_numeric($action_ids)) {
$action = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = '%s'", $action_ids));
$function = $action->callback;
$context = array_merge($context, unserialize($action->parameters));
$result[$action_ids] = $function($object, $context, $a1, $a2);
}
***is now***
else {
// If it's a configurable action, retrieve stored parameters.
if (is_numeric($action_ids)) {
$action = db_fetch_object(db_query("SELECT * FROM {actions} WHERE aid = '%s'", $action_ids));
$function = $action->callback;
if (is_string($function)) {
$context = array_merge($context, unserialize($action->parameters));
$result[$action_ids] = $function($object, $context, $a1, $a2);
}
}
***end****
I have no idea why db_fetch_object is returning the wrong or a bogus object, but it is.
Comment #3
dpearcefl commentedIs this issue still occurring in the current version of Drupal v6?
Comment #4
dpearcefl commentedComment #5
kars-t commentedHi
I don't think this is a core bug or many ppl would be affected. It seems that you are triggering an action that might be deleted some how. Maybe just deleted some "comment" module related module?
So I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.
I don't think this is a core bug or many ppl would be affected. It seems that you are triggering an action that might be deleted some how. Maybe just deleted some "comment" module related module?
Comment #6
kars-t commentedsetting this to fixed so it closes in 14 days.