SMF Support > SMF 2.0.x Support

Undefined Error

(1/4) > >>

Drover:
I'm getting this error:

8: Undefined variable: disable_unhideafter
in Line 1405 of Sources/Display.php


--- Code: ---Line 1403 // Second Option for unhide content, for special hide tag
Line 1404 if ($disable_unhideafter)
Line 1405 $context['user_post_avaible'] = 0;
--- End code ---

Kindred:
looks like you installed a mod which is not properly defining its variables...

Marceline:
Looks like a var added by a mod,  I guest the mod author wanted to check for a boolean or simply 1 or 0, checking for the var itself will generate that error, however if you check with an isset() or !empty()  then it will not generate the error.

By checking for the var itself the var must exists, it $disable_unhideafter = null;   if you check with an iset() or empty()  the var doesn't  necessary need to exists since the check itself if for existence,  a var can exists and still be null.

Drover:

--- Quote ---looks like you installed a mod which is not properly defining its variables...
--- End quote ---

That's what it looked like to me too. Is there any way to figure out what mod or what the correct variable is?


--- Quote ---Looks like a var added by a mod,  I guest the mod author wanted to check for a boolean or simply 1 or 0, checking for the var itself will generate that error, however if you check with an isset() or !empty()  then it will not generate the error.

By checking for the var itself the var must exists, it $disable_unhideafter = null;   if you check with an iset() or empty()  the var doesn't  necessary need to exists since the check itself if for existence,  a var can exists and still be null.
--- End quote ---

I have no idea what this means.  What is an isset() or an empty() and how does that help me fix this problem?  What exactly do I need to do?

MrPhil:
The first question to ask would be, "Did the mod say that it installed correctly, or were there errors reported?" If the mod was then uninstalled, "Did the mod say that it uninstalled correctly, or were there errors reported?" In either case, you could have ended up with a partial installation that used to (or should have) added code to define the variable, and now doesn't.

Navigation

[0] Message Index

[#] Next page

Go to full version