PEAK XOOPS - another newbie question in englishin japanese

another newbie question

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 | Posted on 2004/11/16 14:53
Jenny  企霹始   Posts: 3
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
Votes:0 Average:0.00
Previous post - Next post | Parent - Children.1 | Posted on 2004/11/17 5:20
GIJOE  黎扦烦菱   Posts: 4110
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;
	}
Votes:0 Average:0.00
Previous post - Next post | Parent - No child | Posted on 2004/11/17 17:26
Jenny  企霹始   Posts: 3
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
Votes:0 Average:0.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!