Magic Quotes Check
|Assignee:||Ryan Gordon||% Done:|
|Reported In MyBB Version:||1.4.13||Database Version:|
|PHP Version:||SQA assignments:|
Forgive me if I'm being completely stupid here.
if(version_compare(PHP_VERSION, '5.3', '<'))
Is this not saying to only do this if it's less than 5.3?? Should it not be this??
if(version_compare(PHP_VERSION, '5.3', '>='))
Then it'd run it if it's greater than or equal to 5.3, which is what we'd want it to do.
I'm running 5.3, I echo'd some text inside this if statement, didn't echo, made my change, and it echo'd, so it wasn't being run originally.
#2 Updated by Matt Rogowski about 3 years ago
Thought something didn't quite add up, but isn't all that code there to try and disable magic quotes?? Because a lot of hosts on 5.3.x still have it enabled and it causes problems.
Saying that it didn't solve the \' and \" issue even when it did run the code.
#4 Updated by Dennis Tsang about 3 years ago
I think what Matt's trying to say is that magic quotes only is deprecated, not removed. This means that the functionality of Magic Quotes still works the same way as before; the usage of it is just discouraged.
However, magic quotes is removed in PHP6 I believe. The check should be for that version since the magic quote functions would have been removed by then.