Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
749 views
in Plugins by

Deprecated: Function get_magic_quotes_gpc() is deprecated in /public_html/qa-plugin/q2a-webmaster/library/security.php on line 16

Warning: count(): Parameter must be an array or an object that implements Countable in public_html/qa-include/qa-base.php(720) : eval()'d code on line 160

I am getting these errors on my administrator area's header after installing "Webmaster Tools" plugin. i checked that these errors only shown to admins not visitors. can any one help me solve these errors.

I think @QA-Themes have some solutions.

Q2A version: 1.8.4
by
Towhid is no longer involved with Q2A development.
by
Is the code for that theme public (e.g. on GitHub)? I can take a look and find the issues.
BTW you shouldn’t have notices displayed on a live site.
by
Yes, you can find it on GitHub. Check here : https://github.com/q2a-projects/Q2A-Webmaster

And please if you find any solution so update here. Thanks.

1 Answer

+1 vote
by

OK I've tested the plugin and managed to fix the notices with the following changes:

qa-webmaster-layer.php line 5, change to

function __construct($template, $content, $rooturl, $request)

qa-webmaster-layer.php lines 462, 464, 466 change each of them to

$val = (int) $val * 1024;

library/security.php, line 16, change to:

$security['magic_quotes_gpc']['value'] = 0;

Hopefully that should be everything!

by
You almost there. well done Scott. There is only one error showing:-

Warning: count(): Parameter must be an array or an object that implements Countable in /public_html/qa-include/qa-base.php(720) : eval()'d code on line 160


I am sure you will figure it out. and thanks for your quick reply.
by
That should be fixed by my second change listed. Did you change all 3 lines?
by
Yes, I replaced

line no.5 in qa-webmaster-layer.php with " function __construct($template, $content, $rooturl, $request) "

line no. 462-464-466 with " $val = (int) $val * 1024; " and

line no. 16 in library/security.php with " $security['magic_quotes_gpc']['value'] = 0; "


Then i got one error as i described above.

let me know if there is any misunderstanding from my side.
by
I think that must be a different plugin because there is no count() function used in the webmaster plugin.
...