TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,250
  • Total Topics: 21,354
  • Online today: 626
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Errors in SMF Log

Started by Goad, February 03, 2010, 03:24:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Goad

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

ccbtimewizard

Disable template evaluation please.

Goad

please explain what that is and where i can find the setting. i searched this site for "template evaluation" and found nothing


Goad

ok, its been disabled. error is still happening. now what?

ccbtimewizard

The error should still be happening, but it should be returning the real line.

Can you copy/paste the new error?

Goad

2: Invalid argument supplied for foreach()
File: /home/socaljet/public_html/scjb/Themes/default/TPortal.template.php
Line: 15

ccbtimewizard

What is the line of code there? Can you show me a small blurb?

Goad

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();

}

ccbtimewizard

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;

      }
}

   }

This website is proudly hosted on Crocweb Cloud Website Hosting.