#32761 closed defect (bug) (invalid)
Fatal error: Call to undefined method WP_Meta_Query::get_clauses() in /wp-includes/comment.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2.2 |
Component: | Comments | Keywords: | |
Focuses: | Cc: |
Description
Hi,
I just upgraded one of my websites from WP 4.1.1 to 4.2.2 since this upgrade I get the following error while loading the comments.php of my custom theme. I've disabled all comments related plugins (Akismet & Disqus) and still get the error. Unfortunately I cannot provide steps to reproduce the error on a blank install.
Fatal error: Call to undefined method WP_Meta_Query::get_clauses() in /path-to-website-root/wp-includes/comment.php on line 962
A websearch finds many blogs with a similar error message but no solution. I believe that it might be a core bug. While I don't know the inner workings of the comment engine and especially the use of the in WP 4.2 introduced get_clauses wrapping the error producing fragment into a method_exists call avoids the error
if (method_exists($this->meta_query, "get_clauses")){ $meta_query_clauses = $this->meta_query->get_clauses(); if ( $meta_query_clauses ) { $allowed_keys = array_merge( $allowed_keys, array_keys( $meta_query_clauses ) ); } }
Many thanks!
Change History (4)
#4
@
9 years ago
Hi,
I have the same error on my web page http://fun-baby-games.com/ but I made latest update to WordPress 4.4 and the error disappear. Thank you for helping me :)
Core code did not fully update. Once done bug disappeared...