getting the following error:
2: Invalid argument supplied for foreach()
File: /home/socaljet/public_html/scjb/Themes/default/languages/TPShout.english.php (main sub template - eval?)
Line: 15
line 15 from TPShout.english.php
$txt['tp-show_profile_shouts'] = 'Hide shouts in the profile?';
SMF version: 1.1.11
TP version: 1.0 Beta 4
Theme name and version: Default
Browser Name and Version: IE/FF
Mods installed: TP
Related Error messages: see above
Disable template evaluation please.
please explain what that is and where i can find the setting. i searched this site for "template evaluation" and found nothing
http://custom.simplemachines.org/mods/index.php?mod=2054
ok, its been disabled. error is still happening. now what?
The error should still be happening, but it should be returning the real line.
Can you copy/paste the new error?
2: Invalid argument supplied for foreach()
File: /home/socaljet/public_html/scjb/Themes/default/TPortal.template.php
Line: 15
What is the line of code there? Can you show me a small blurb?
Line 15 is in bold...
// show the linktree?
$context['TPortal']['linktree_show']=false;
$nolayer=false;
if($context['TPortal']['front_type']!='frontblock')
{
foreach($context['TPortal']['boardnews'] as $bb)
{
if(isset($bb['options']['nolayer']))
$nolayer=true;
elseif(isset($bb['options']['linktree']))
$context['TPortal']['linktree_show']=true;
}
}
if($nolayer)
template_main_nolayer();
else
template_main_tportal();
}
This:
if($context['TPortal']['front_type']!='frontblock')
{
foreach($context['TPortal']['boardnews'] as $bb)
{
if(isset($bb['options']['nolayer']))
$nolayer=true;
elseif(isset($bb['options']['linktree']))
$context['TPortal']['linktree_show']=true;
}
}
Make it:
if($context['TPortal']['front_type']!='frontblock')
{
if (!empty($context['TPortal']['boardnews']) && is_array($context['TPortal']['boardnews']))
{
foreach($context['TPortal']['boardnews'] as $bb)
{
if(isset($bb['options']['nolayer']))
$nolayer=true;
elseif(isset($bb['options']['linktree']))
$context['TPortal']['linktree_show']=true;
}
}
}
that has cleared that error. i had so many of them coming in....5 to 6 a second
thanks! ;)