Log in

View Full Version : Odd buddy list message


Simon Lloyd
09-01-2013, 06:56 PM
Hi all, I've got a strange one, I have a user who has tried to look at his buddy list but he doesn't have anyone on it, he sees this messageprint_standard_error(...)
is now redundant. Instead, use
standard_error(fetch_error(...))I've searched plugins, phrases and templates but cannot find where this message is coming from, f it helps (and I doubt it) I have just moved from PHP 5.2.17 to PHP 5.3.x

If I know where this is coming from I can fix it but as far as i'm able to see it doesn't exist anywhere!???

Amaury
09-01-2013, 07:10 PM
I don't staff any vBulletin 3 forums, but was it an issue before the PHP upgrade?

Simon Lloyd
09-01-2013, 07:20 PM
No it wasn't, anyway, I've found the reason I get that rather than "you don't have any buddies" message, a plugin I coded which checked if the request was misc.php do=...etc had an IF{}ELSE{ in it where if the else was met it worked for all misc.php requests.

Now on to the problem, it seems that this:
eval(print_standard_error('$vbphrase[no_perm_rep_post]'));
Which works and always has is what's causing the error in that plugin, changing it for this:
standard_error(fetch_error('$vbphrase[no_perm_rep_post]'));
causes a fault???

kh99
09-01-2013, 10:33 PM
Are you sure it's always worked? The function print_standard_error() seems to have been coded to print that error message since at least 3.6.2 (that's the oldest version I have code handy for). Maybe you've just never triggered that error before.

Simon Lloyd
09-02-2013, 04:51 PM
Hi Kevin, you may be right about triggering the error however, now that i've changed the IF ELSE containment the print_standard_error works (or appears to) if i replace it with standard_error(fetch_error it gives errors??

kh99
09-02-2013, 05:42 PM
Oh, I see what you meant. Well, I think you need to remove the single quotes from around the variable, like:
standard_error(fetch_error($vbphrase['no_perm_rep_post']));


but I'm not sure if that's what was causing the fault.

ETA: actually I'm not sure if you need the call to fetch_error() in there since it looks like you're using a phrase that's already loaded.

Simon Lloyd
09-02-2013, 05:46 PM
Ill give that a try later, thanks :)

tbworld
09-02-2013, 07:54 PM
Oh, I see what you meant. Well, I think you need to remove the single quotes from around the variable, like:
standard_error(fetch_error($vbphrase['no_perm_rep_post']));but I'm not sure if that's what was causing the fault.

ETA: actually I'm not sure if you need the call to fetch_error() in there since it looks like you're using a phrase that's already loaded.

I cannot see any reason for the single quotes either. I was going to post the same thing but of course @Kh99 has a more quicker-er and sharper-er mind then mine.

kh99
09-02-2013, 10:01 PM
I cannot see any reason for the single quotes either. I was going to post the same thing but of course @Kh99 has a more quicker-er and sharper-er mind then mine.

Yeah right. I just happened to get there first this time.