Recently upgraded and was getting the following error for each line in the report when it was run:
warning: htmlspecialchars() expects parameter 1 to be string, array given in /home/bbc/bbclub/includes/bootstrap.inc on line 857.
warning: implode() [function.implode]: Invalid arguments passed in /home/bbc/bbclub/sites/all/modules/uc_who_bought_what/uc_who_bought_what.module on line 183.
Traced it to the following code:
foreach ($attrlist as $myattrib) {
$thisdatum = $mydata['attributes'][$myattrib['data']];
if (is_array($thisdatum) == 1) { //Since UC 6.x-2.0-rc6, attributes are stored as arrays just in case there is more than $
$temparray[] = implode(' | ', check_plain($thisdatum));
} else {$temparray[] = check_plain($thisdatum);}
}
Removed check_plain function from the line "$temparray[] = implode(' | ', check_plain($thisdatum));" and was able to make the error go away.
Comments
Comment #1
cayenne commentedGreat work.
I see the problem. Checkplain should not have been applied to what was by definition an array. I'll get a fix out asap.
Thank you.
Comment #2
cayenne commentedWow, sorry for the delay in posting. I just posted it to the dev version. I am making other changes, cleaning up issues. Look for a dev version of jan 25 or later.
Comment #3
cayenne commentedOkay, that was fun. Fixed version posted as release 12