Support » Plugin: Post Views Counter » Trying to get property of non-object

  • When on the main admin dashboard page, and with the Query Monitor (QM) plugin installed, QM reports “Ajax: notice”. Checking the browser console, I can see the following two issues:

    
    Object { type: "notice", message: "Trying to get property 'labels' of non-object", file: "wp-content/plugins/post-views-counter/includes/dashboard.php", line: 225, stack: (2) […], component: "Plugin: post-views-counter" }
    query-monitor.js:300:6
    Object { type: "notice", message: "Trying to get property 'name' of non-object", file: "wp-content/plugins/post-views-counter/includes/dashboard.php", line: 225, stack: (2) […], component: "Plugin: post-views-counter" }
    query-monitor.js:300:6
    

    Commenting out line 225 in dashboard.php seems to resolve this, so that is evidently the cause of the notices. You are no doubt a better judge than I am about whether that line should be modified rather than deleted.

  • The topic ‘Trying to get property of non-object’ is closed to new replies.