Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

Community



Stats


  • *Total Posts: 16389
  • *Total Topics: 2501
  • *Online Today: 14
  • *Most Online: 292
(12.11.16, 09:37:31)
  • *Users: 0
  • *Guests: 0
  • *Spiders: 3
  • *Total: 3

  • *Baidu (3)

Author Topic: Undefined Error Subforums.template.php Line: 68  (Read 9553 times)

0 Members and 0 Guests are viewing this topic.

Offline ahrasis

  • Full Member
  • ***
  • Posts: 134
  • Gender: Male
  • Peace2u
    • ahrasis
Code: [Select]
66: foreach($part['cats'] as $catid)
67: {
==>68: echo str_replace(' ', ' ', $context['subforums']['SMF_Cats'][$catid]) . (!empty($islast) ? ', ' : '');
69: $islast--;
70: }

Offline feline

  • CO PortaMx corp.
  • Administrator
  • *
  • Posts: 5779
  • Gender: Female
Re: Undefined Error Subforums.template.php Line: 68
« Reply #1 on: 12.08.14, 13:00:54 »
Try follow code:

Code: [Select]
foreach($part['cats'] as $catid)
{
echo str_replace(' ', ' ', $context['subforums']['SMF_Cats'][$catid]) . ($islast > 0 ? ', ' : '');
$islast--;
}
Many are stubborn in relation to the path, a few in relation to the target.

Offline ahrasis

  • Full Member
  • ***
  • Posts: 134
  • Gender: Male
  • Peace2u
    • ahrasis
Re: Undefined Error Subforums.template.php Line: 68
« Reply #2 on: 14.08.14, 10:02:47 »
I'm testing this. I will report later.

Offline ahrasis

  • Full Member
  • ***
  • Posts: 134
  • Gender: Male
  • Peace2u
    • ahrasis
Re: Undefined Error Subforums.template.php Line: 68
« Reply #3 on: 18.09.14, 20:26:39 »
Sorry for not coming back for quite some time but this is still an error to me. The same line:

Code: [Select]
66: foreach($part['cats'] as $catid)
67: {
==>68: echo str_replace(' ', ' ', $context['subforums']['SMF_Cats'][$catid]) . ($islast > 0 ? ', ' : '');
69: $islast--;
70: }

Offline ahrasis

  • Full Member
  • ***
  • Posts: 134
  • Gender: Male
  • Peace2u
    • ahrasis
Re: Undefined Error Subforums.template.php Line: 68
« Reply #4 on: 04.10.14, 07:19:44 »
After a deep and thorough checking, I find out that there is no problem with the original code. The problem was cause by one of the subforums was fixed without any categories. As such, the error occurs. When the said subforum was removed, the said error do not reproduce again. I hope this will help anyone who is facing the same problem as mine.

Offline portamx

  • Administrator
  • *
  • Posts: 156
Re: Undefined Error Subforums.template.php Line: 68
« Reply #5 on: 07.10.14, 14:29:30 »
ahh .. ok, i will look at the code part so we can supress a error if no category assigned to a subforum...