How to fix critical error trying to check post revision?
-
For a few weeks now, in the classic post editor, if I click a link for a revision, I receive the “There has been a critical error on this website. Please check your site admin email inbox for instructions.” error message.
Up on checking the apache logs, this is what’s causing the problem:PHP Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /var/www/html/wp-includes/formatting.php:5365\nStack trace:\n#0 /var/www/html/wp-includes/formatting.php(5365): trim()\n#1 /var/www/html/wp-includes/pluggable.php(2919): normalize_whitespace()\n#2 /var/www/html/wp-admin/includes/revision.php(118): wp_text_diff()\n#3 /var/www/html/wp-admin/includes/revision.php(337): wp_get_revision_ui_diff()\n#4 /var/www/html/wp-admin/revision.php(137): wp_prepare_revisions_for_js()\n#5 {main}\n thrown in /var/www/html/wp-includes/formatting.php on line 5365, referer: (my-post-link)
How do I fix this problem?
PS: I’m in the latest version of WordPress. I switched the theme, and I’m getting the same error.
- The topic ‘How to fix critical error trying to check post revision?’ is closed to new replies.