Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
350 views
in Q2A Core by
edited by
What does this error mean?

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; qa_layer_30_from_layer_php has a deprecated constructor in /tmp/fakeEvalbdkKEo on line 4

How is it repaired?
Q2A version: 1.8.6

1 Answer

+1 vote
by

There's information missing in your question.. Like what plugin are you using and where does this error occur etc.

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP;

You'll need to go to /tmp/fakeEvalbdkKEo on line 4 and rename your function to  __construct() .


Explanation: In previous versions of PHP, if PHP cannot find a  __construct()  function for a given class, it will search for the old-style constructor function, by the name of the class, but now old style constructors are DEPRECATED in PHP 7.0, and will be removed in a future version. You should always use  __construct()  in new code. Read php manual.
src: stackoverflow

by
This Error
PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; qa_layer_30_from_layer_php has a deprecated constructor in /public_html/askmepal.com/qa-include/qa-base.php(720) : eval()'d code on line 3

[22-May-2024 11:55:13 America/Chicago] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /public_html/askmepal.com/qa-include/qa-base.php(720) : eval()'d code on line 86
by
edited by
That's most likely a plugin that's outdated.
Impossible to blindly figure out with this little information..

If you don't know which plugin is throwing this error, check out this question and follow the steps to help you figure out which plugin it is.
https://question2answer.org/qa/113635/how-to-debug-plugin-conflicts
...