Query Monitor PHP warning
-
When using the Content Control Query Monitor display I get error:
Warning: Attempt to read property "post_title" on null in /var/www/html/wp-content/plugins/content-control/classes/QueryMonitor/Output.php on line 219 Warning: Attempt to read property "post_type" on null in /var/www/html/wp-content/plugins/content-control/classes/QueryMonitor/Output.php on line 220
I think the problem is that user_can_view_content can be called with post_id null. So get_post( $post_id ) in “output_post_restrictions” will return null in these cases. Hence, the warning message.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Query Monitor PHP warning’ is closed to new replies.