Page 1 of 1

urgent help...

Posted: 04 Jan 2011, 00:08
by navibd
Warning: Invalid argument supplied for foreach() in /home/xxxxxx/public_html/components/com_phocadownload/views/sections/tmpl/default.php on line 39




I want to know what is the problem.
it was at first in line 22 and I found 2 blank line and cleaned them!
then error went to line 41! i font 2 blank line .I cleaned them too!
now the error goes to line 39

Code: Select all

foreach ($value->categories as $valueCat) {
			
			// USER RIGHT - Access of categories - - - - -
			// ACCESS is handled in SQL query, ACCESS USER ID is handled here (specific users)
			$rightDisplay	= 0;
			if (!empty($valueCat)) {
				$rightDisplay = phocadownloadHelper::getUserRight('accessuserid', $valueCat->accessuserid, $valueCat->access, $this->tmpl['user']->get('aid', 0), $this->tmpl['user']->get('id', 0), 0);
			}

help me please............

I was checking back end and there was a problem there which is

Code: Select all

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/xxxxx/public_html/libraries/joomla/database/database/mysql.php on line 344

343 to 345 lines contain

Code: Select all

function getNumRows( $cur=null )
	{
		return mysql_num_rows( $cur ? $cur : $this->_cursor );
	}

I used my back-up files and restore to 2 day earlier , but I still receive this error..:( what is it exactly ? and why it happend to me ?

Re: urgent help...

Posted: 05 Jan 2011, 15:47
by Jan
Hi, mostly this is not caused with php error, this is caused with empty outcome from database, you should enable debug mode, so you get probably information about database error (e.g. missing column in database table, etc.)

Jan