• Hallo, i have continuosly in error log inside wordpress: PHP Catchable fatal error: Object of class WP_Error could not be converted to string in /home/myvenice/www/wp-includes/kses.php on line 1249

    the line 1249 is here:

    $string = preg_replace( ‘/[\x00-\x08\x0B\x0C\x0E-\x1F]/’, ”, $string );

    how to fix? i found in forum similar error but not undesrtand how to fix it…
    thank you.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Some code is calling wp_kses_no_null() without first checking if it was passed an error object instead of the expected string. To find the code, you’d need to install a custom error handler that makes use of debug_backtrace() so you know the function calls preceding the error.

    If that’s too much for you, install and activate the health-check plugin, then invoke troubleshooting mode. There should be no errors in this mode. You will need a reliable way to invoke the error for this to be productive. Using the troubleshooting item in the admin bar, restore your theme, then your plugins, one at a time, testing after each. When the error returns, the last activated module is the cause. Take up the issue with the related author.

    Thread Starter porosionok

    (@porosionok)

    thank you but there’s not a way to modify the line 1249 that called the problem?

    the line as told is:

    $string = preg_replace( ‘/[\x00-\x08\x0B\x0C\x0E-\x1F]/’, ”, $string );

    thanks.

    Moderator bcworkz

    (@bcworkz)

    That line did not cause the problem, it merely flagged an earlier error. There is nothing wrong with that line. Altering it will not solve the earlier problem. You need to find the earlier, root cause of the problem, which is what debug_backtrace() will do for you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php catchable error kses.php line 1249’ is closed to new replies.