News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Wrong code?

Started by netridge, August 06, 2008, 04:53:51 PM

Previous topic - Next topic

netridge

what is wrong with this code, I keep getting this error in my logs and can't figure it out. I tried asking the author of the theme but got no reply.

Quote8: Undefined offset: 335
File: /BoardIndex.template.php (main sub template - eval?)
Line: 205

8: Undefined offset: 336
File: /BoardIndex.template.php (main sub template - eval?)
Line: 205

$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>' . ' (' . $txt[335] . '' . $child['topics'] . '/' . $txt[336] . '' . $child['posts'] . ')';

Nathaniel

It means that the 336 index in the $txt variable is missing, it occurs for this variable $txt[336].

This language string however doesn't exists. So either there is a problem with the language strings for the theme, or there is a type in that line of code.

I might be able to help you more, if you can tell me which theme it is?
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.


ccbtimewiz

In order to actually see where this error is coming from, you need to disable eval. Please open your phpmyadmin, and type this following command:

INSERT INTO smf_settings VALUES ('disableTemplateEval', 1);

Then paste to us the errors that come up.

Then reactivate eval once you finish by doing:

DELETE FROM smf_settings WHERE variable = 'disableTemplateEval';

Advertisement: