In requesting a preview of a file uploaded through the front end of the site I got this error
Warning: array_push(): First argument should be an array in /home/jensclas/public_html/class/module.textsanitizer.php on line 113
what does it mean and how do I fix it?
The photo was 'successfuly' recieved with same warning as in previous post and then don't show at all
Thanks
hi Jenny.
It is a well-known bug of the core.
Perhaps, it will be fixed in XOOPS 2.0.9
All you have to do is turn "PHP debug" off.
Or, you can edit line 110 of class/module.textsanitizer.php like this:
function &smiley($message)
{
$db =& Database::getInstance();
if (empty($this->smileys)) {
$this->smileys = array() ;
if ($getsmiles = $db->query("SELECT * FROM ".$db->prefix("smiles"))){
while ($smiles = $db->fetchArray($getsmiles)) {
$message =& str_replace($smiles['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smiles['smile_url']).'" alt="" />', $message);
array_push($this->smileys, $smiles);
}
}
} else {
foreach ($this->smileys as $smile) {
$message =& str_replace($smile['code'], '<img src="'.XOOPS_UPLOAD_URL.'/'.htmlspecialchars($smile['smile_url']).'" alt="" />', $message);
}
}
return $message;
}
yikes...whoooaah! That's scary for a newbie!
I am using the latest release of xoops..I think it is the beta version...
I think I will try another module first...I don't think I am ready yet for playing in a php sandpit!
Cheers