PHP Notice: Trying to get property ‘post_type’ of non-object
-
[Mon Sep 27 06:22:19.313616 2021] [proxy_fcgi:error] [pid 8290] [client 172.70.42.63:21338] AH01071: Got error ‘PHP message: PHP Notice: Trying to get property ‘post_type’ of non-object in /home/[user]/public_html/wp-includes/class-wp-query.php on line 4196PHP message:
PHP Notice: Trying to get property ‘post_type’ of non-object in /home/[user]/public_html/wp-includes/class-wp-query.php on line 4196
PHP message: PHP Notice: Trying to get property ‘ID’ of non-object in /home/[user]/public_html/wp-content/plugins/quick-pagepost-redirect-plugin/page_post_redirect_plugin.php on line 4421′
If for some reason, the global post isn’t populated here, it will throw an error notice. I would recommend a patch to check to make sure the global post is set first. Line 4419:
if ( isset($post) && count( $this->ppr_all_redir_array ) > 0 && ( is_single() || is_singular() || is_page() ) ) {
- The topic ‘PHP Notice: Trying to get property ‘post_type’ of non-object’ is closed to new replies.