Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.3k views
in Q2A Core by
edited by
Well I installed q2a for first time. And i have no idea how it works. But I am welcomed by this function.

Can someone please tell how i can get rid of  get_magic_quotes_gpc() function.

or some better solution to replace it with something which is secure.

Can we use  stripslashes_deep here? If yes,then How?

Thank You..
Q2A version: question2answer-1.8.3
by
Does it cause any error by now? My PHP version is 7.1 and it caused nothing. Maybe, it will in PHP 7.4

But it seems to me that the current code is to make sure it will work in all PHP versions.
    return get_magic_quotes_gpc() ? stripslashes($string) : $string;

If the get_magic_quotes_gpc function is still supported in old PHP version, then it will return  stripslashes($string) instead of $string.

Am i correct?
by
First of all, thank you very much for your comment. I am actually pleased.
Secondly, hat's off to all contributors for their great work. It's best CMS I found open source.
Thank a lot to all of them.

Yes, you are correct. I managed the passage of $string with stripslashes_deep().
But I am no developer so can't commit to this great CMS. Sorry for that, besides I am not sure if my solution is compatible or not. But it works.

Thank you again.
by
And yes, in php 7.4 that function is deprecated.

1 Answer

+1 vote
by
I've implemented a fix for this that will be in the next version of Q2A (1.8.4) coming out soon.

Note, as a general rule you should not have PHP Notices displaying on a live website.
...