Getting this error after upgrading to PHP 5.3:
warning: call_user_func_array() expects parameter 2 to be array, string given in /cs/web/www-devel.cs.ubc.ca/docs/drupal/sites/all/modules/rules/rules/rules.module on line 851.
The second parameter has to be an array to work, but according to the PHP.net page it wasn't enforced until PHP5.3 - not sure what it did before, though, it must have tried *something* but what... ? To fix it, I typecast the $name variable string to array in rules_item_delete(), since there's only ever going to be one parameter per call (as far as I can tell). Patch attached.
Comments
Comment #1
Renee S commentedComment #3
Renee S commentedD'oh.
Comment #4
Renee S commentedComment #6
Renee S commentedSigh.
Comment #7
Renee S commentedCrap.
Comment #8
fagothanks, I don't think this is the right fix though. I committed another one, please test.
Comment #9
Renee S commentedTypecasting (array)$var is equivalent to initializing array($var) :) Default setting on the argument'll catch any other instances, tho, I didn't think of that - works great. Thanks! :)
Comment #10
dspring0021 commentedPardon my ignorance, guys, but, so, which patch do we use and where can I find it?
Comment #11
Renee S commentedIt's been fixed and committed to dev, dspring0021, just get the latest dev version and it should work fine. The patch is incomplete, don't use that :)
Comment #12
dspring0021 commentedThanks, renee. :-)