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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 468
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 91
  • Total: 91

How to fix an Undefined variable error?

Started by microbone, January 04, 2008, 12:27:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

microbone

Hi there

Right now my error log gets filled with this error:

8: Undefined variable: activeu
File: somepathonsite/forum/Themes/default/TPortal.template.php (main_below sub template - eval?)
Line: 55


Do some of you might know how to fix this error?
and maybe explain what is causing this!

Best Regards
bone..


IchBin

You need to track down "when" it is happening. Make sure you have two windows open. Navigate one to the home page of your site and one to the error log. First clear your error log. Then click through your site one page at a time, each time checking the error log by refreshing the page. Take notice of which pages you are on if/when the error appears in the error log. If it happens only on a certain page, then you can go to the file associated with that page. If it happens on all pages then its most likely in the index.template.php file.

However, the activeu error is not a TP error.

G6Cad

Seems more like a language issue. Make sure you have all the language strings for what ever language you use in the correct place. (including the mods language strings)

microbone

#4
Yeah I´ve searched a lot here to find an answer ZTN...

Found the error it was related to some block code i use!

but thanks a lot for the replies they helped me get on the right track there :)

A new question related to this...

In a php block a code line looks like this:
$activeu .= $link." ";

How can this create an error log entry and why does smf parse this as an error?

Best Regards
bone..

IchBin

Well it depends on your code. The code you posted appends the $link info to your $activeu variable. If the variable doesn't exist, you're trying to append it to an undefined variable.

This website is proudly hosted on Crocweb Cloud Website Hosting.