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

sderrick’s picture

Its a d*** shame when nobody responds to a bug in the core!

sderrick’s picture

Well 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.

dpearcefl’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Is this issue still occurring in the current version of Drupal v6?

dpearcefl’s picture

Priority: Normal » Major
Status: Postponed (maintainer needs more info) » Active
kars-t’s picture

Hi

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?

kars-t’s picture

Status: Active » Fixed

setting this to fixed so it closes in 14 days.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.