Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: Soulsiick - syyskuu 12, 2011, 07:45:28 IP

Otsikko: Error when changing a nickname
Kirjoitti: Soulsiick - syyskuu 12, 2011, 07:45:28 IP
There is user in my forum when I want to change his nickname to Fidanzata d'Italia the forum shows me this error :

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Italia' OR memberName LIKE 'Fidanzata d'Italia')
LIMIT 1' at line 4

file : /home/talarju/public_html/Sources/Subs-Members.php
Line : 936

And the line in the file says :

LIMIT 1", __FILE__, __LINE__);


+ the forum version is 1.1.14
Otsikko: Re: Error when changing a nickname
Kirjoitti: Oldiesmann - syyskuu 12, 2011, 10:23:48 IP
The apostrophe is messing it up, and SMF isn't escaping it for some reason. Try entering the name as Fidanzata d\'Italia instead and see if that works.
Otsikko: Re: Error when changing a nickname
Kirjoitti: Soulsiick - syyskuu 13, 2011, 04:05:56 AP
Didn't work. Gives the same error. But tried Fidanzata dItalia just to make sure if its the apostrophe, and it worked fine without it.

what else can I do ?
Otsikko: Re: Error when changing a nickname
Kirjoitti: ziycon - syyskuu 13, 2011, 07:39:02 AP
Try entering it as Fidanzata d''Italia.
Otsikko: Re: Error when changing a nickname
Kirjoitti: Soulsiick - syyskuu 13, 2011, 01:38:56 IP
Well it worked, kind of ! Cause that's not really solved the problem.

But anyway, thanks.
Otsikko: Re: Error when changing a nickname
Kirjoitti: Oldiesmann - syyskuu 13, 2011, 03:36:48 IP
SMF doesn't expect apostrophes in user/display names, but if they are supported (as it appears they are), then we need to escape them. I'll test it out on my 2.0 test board later, and if it's still a problem, I'll file a bug report about it.