Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: Bigguy on November 24, 2018, 02:16:50 PM

Title: Profile-Modify
Post by: Bigguy on November 24, 2018, 02:16:50 PM
I just downloaded the latest zip from GH and went to open Profile-Modify file to check some things out and my editor caught what seems to be an error in that file. Right at the bottom around line 4206. It could just be my editor but does anyone see an error down there at all.
Title: Re: Profile-Modify
Post by: Arantor on November 24, 2018, 02:30:40 PM
Nope, what error does it think it's found?
Title: Re: Profile-Modify
Post by: Bigguy on November 24, 2018, 02:33:51 PM
"Can't use function return value" is all it says on this line:

if (!empty($smcFunc['db_num_rows']($request)))

line 4207
Title: Re: Profile-Modify
Post by: Arantor on November 24, 2018, 02:55:33 PM
Not sure why, that would have broken a ton of stuff by now, I'd have thought...
Title: Re: Profile-Modify
Post by: Bigguy on November 24, 2018, 03:02:00 PM
I didn't expect to find an error in that file. I downloaded the one from my site to look at it and the error popped up. So I downloaded the zip file from GH and looked at a clean un-touched file and it had the same error. My site runs fine with this error but I am not using tfa either. Is that what this error has to do with....I'm guessing ???
Title: Re: Profile-Modify
Post by: Bigguy on November 24, 2018, 03:03:21 PM
If it's not an error than I guess I will change editors, lol. :)
Title: Re: Profile-Modify
Post by: albertlast on November 24, 2018, 03:13:53 PM
their is no error.
Title: Re: Profile-Modify
Post by: Bigguy on November 24, 2018, 03:15:19 PM
Guess I'm changin editors, lol. Thanks all.  :)
Title: Re: Profile-Modify
Post by: Arantor on November 24, 2018, 03:19:48 PM
Your editor isn't current, it is correct in that PHP used to fail on that type of statement, back before PHP 5.5 came out, but since 5.5 it's been valid.

I've been on that for so long I'd actually forgotten, but it also is a bug in 2.1 which claims to work on 5.4... and yet requires 5.5 currently.

PoC for syntax purposes: https://3v4l.org/NUcUo
Title: Re: Profile-Modify
Post by: Bigguy on November 24, 2018, 03:25:19 PM
Well, in that case I will just update my editor, lol. I understand what you are saying. I saw the online php editor, that's kinda cool.  Thanks for explainin it a bit more. :)
Title: Re: Profile-Modify
Post by: Sesquipedalian on December 17, 2018, 02:48:42 PM
Fixed in https://github.com/SimpleMachines/SMF2.1/issues/5207
Title: Re: Profile-Modify
Post by: Bigguy on December 17, 2018, 06:38:58 PM
Hey, look at that...it was a bug of sorts.