Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits
Joomla 1.0.9 Invalid argument supplied for foreach() in frontend.php on line 85 Print E-mail
User Rating: / 0
PoorBest 
Wednesday, 14 June 2006 11:19
  In order to solve  to following issues in Joomla 1.0.9

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/waltercedric.com/httpdocs/includes/frontend.php on line 85

Edit the file includes/frontend.php , this is the correct code: 

/**
* Cache some modules information
* @return array
*/
function &initModules() {
global $database, $my, $Itemid;

if (!isset( $GLOBALS['_MOS_MODULES'] )) {
$query = "SELECT id, title, module, position, content, showtitle, params"
. "\n FROM #__modules AS m"
. "\n INNER JOIN #__modules_menu AS mm ON mm.moduleid = m.id"
. "\n WHERE m.published = 1"
. "\n AND m.access <= '". $my->gid ."'"
. "\n AND m.client_id != 1"
. "\n AND ( mm.menuid = '".$Itemid."' OR mm.menuid = 0 )"
. "\n ORDER BY ordering";

$database->setQuery( $query );
$modules = $database->loadObjectList();
foreach ($modules as $module) {
$GLOBALS['_MOS_MODULES'][$module->position][] = $module;
}
}
return $GLOBALS['_MOS_MODULES'];
}
In yellow  what has changed in that  method (extract)
. "\n AND m.access <= '". $my->gid ."'"
and
. "\n AND ( mm.menuid = '".$Itemid."' OR mm.menuid = 0 )"



All credits goes to user Mathinka (JoomlaPortal.de)

Tags See All Tags Add New Tag...

Please Enter New Tags Separated By Comma's
  Or Close


Powered By Joomla Tags

Last Updated ( Wednesday, 14 June 2006 11:48 )
 
Content View Hits : 2726402

Enter Amount: