2.2.5 Update throwing "Undefined property" notice.
-
As of the 2.2.5 update, WordPress’ query.php has been throwing a notice level error on every page when I have WP_DEBUG enabled.
Notice: Undefined property: WP_Query::$is_front_page in /public_html/wp-includes/query.php on line 3960
I’ve backtraced the issue to line 737 of aioseop_opengraph.php
The difference between 2.2.4.2 and 2.2.5, beginning at line 735 is as follows:
global $aiosp; $this->type = ''; if ( is_front_page() ) {
global $aiosp, $wp_query; $this->type = ''; if ( $wp_query->is_front_page ) {
Looks as though the code now relies on the $wp_query Global to check against the is_front_page flag. The WP_Query object in question doesn’t appear to have that variable set at the time of execution.
The backtrace didn’t indicate that any other plug-ins or themes are involved, so I suspect it’s a bug.
The issue was resolved by wrapping the condition with !empty()
- The topic ‘2.2.5 Update throwing "Undefined property" notice.’ is closed to new replies.