You are running a very old version of PHP. You can upgrade to at least version 5.3 of PHP or you can comment out that line of code. It turns off comments.
Thanks for your answer. I try to remove that line but i have the same problem with next line. It is a problem if i remove the other line etc…
Thanks for your quick answer.
you need to remove the entire filter. So comment out or delete all of the lines below.
//Turn off comments for pages user doesn’t have access to.
add_filter(‘comments_open’, function () {
return false;
});
Hi, It worked after i delete this line, but now i have another error. Can this be solved? “Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘Woocommerce_PayPerPost::render’ was given in /home/public_html/www.sitename.com/wp-includes/class-wp-hook.php on line 298”. Thanks.
What version of wordpress are you running, what version of php are you running? Where does that warning appear? That isn’t an error just a warning, but it still should not be happening.
Hi, I am using the latest version of WordPress and php version is 5.2… this warning substitute post excerpt.
you can easily hide those warnings by simply turning error reporting off. Take a look at https://wordimpress.com/php-turn-on-or-off-error-reporting/
I would recommend upgrading PHP as that will remove the warning, but if you cant then hide the notice.