I'm running a WordPress 4.4.2. I have one site that's working fine. When I went to set up another site, I got the following error upon trying to save the "general" settings page:

Catchable fatal error: Object of class WP_Error could not be converted to string in /{site-url}/wp-includes/formatting.php on line 1025'

Before saving the settings, I deleted the existing sample page and sample post and created a new page. Didn't touch anything else.

After researching the problem, I have done all of the following:

  • Deactivated all plugins (error persists)
  • Changed to default WordPress theme (error persists)
  • Reinstalled current WordPress version (error persists)
  • Upgraded the network (error persists)
  • Checked Options tables in phpMyAdmin, no fishy strings exist
  • Compared Options table between the site with and without the error, they seem identical
  • Run the WP-Optimize plugin

I notice that I can only save values to the Options table from phpMyAdmin. When I try via the browser (ex. wp-admin/network/site-settings.php?id=#), the options don't save.

When I set an additional site to test, I don't have this problem. Obviously, I can just delete the site and start over, but a) the problem exists also on my default multisite, and b) I'd like to understand what's causing it.

Is this a bug? Am I missing something obvious?

  • This would almost have to be a plugin or theme problem. Somewhere a query is returning an error and instead of handling the error, the error object it is being passed to sanitize_text_field() or something similar. I know you said you deactivated plugins and used a default theme but I can't help but think there's a call being made from outside WP core. Can you provide a stack trace of the error?
    – BillK
    Commented Feb 15, 2016 at 20:53
  • 3
    The stack trace should help you find the call passing the error object. You can then examine that object for more information.
    – BillK
    Commented Feb 15, 2016 at 20:57
  • 1
    The function in question the warning occurs at is wp_check_invalid_utf8, you should try extracting a fresh copy of WordPress over the top of your existing install, if using a standard theme and no plugins gives you this error then this implies modifications have been made to WordPress itself, or mu-plugins and drop in files are present
    – Tom J Nowell
    Commented Feb 15, 2016 at 21:08
  • Check whether you have a mu-plugins folder. A while ago I had some weird problems with BlueHost. It seems that they add automatically a plugin there to integrate with some app in their cPanel. Commented Feb 17, 2016 at 7:29

2 Answers 2


I had the same issue and I cleaned the content of the row called theme_mods_YOURTHEMENAME (into the table wp-options)

I copy/past the content I had with a previous backup.

Now it works well.


You havent included all lines of the error page. Only that line is not enough. As a quick solution, you can insert in wp-includes\formatting.php 1025 line:


and see what you get.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.