• Resolved johnny538

    (@johnny538)


    Getting a lot (thousands every 24hours) of these:

    PHP Notice: Trying to get property of non-object in /var/www/html/wp-content/plugins/broken-link-checker/includes/any-post.php on line 298

    please fix

Viewing 2 replies - 1 through 2 (of 2 total)
  • hongpong

    (@hongpong)

    hi @johnny538 I have logged your issue here
    https://github.com/HongPong/broken-link-checker/issues/33

    looks to me like this

    
            if ( empty($post) || !in_array($post->post_type, $this->enabled_post_types)) {
    

    Perhaps $post is not empty and $this is unset. That would lead to this condition I think. More careful checking of the nature of $this may be needed since this code could be triggered in an odd place?

    Entering a debug statement above the line, or var_dump($post) and var_dump($this) might be needed to figure this out.

    Also need to know WP and PHP versions in play here since the ’empty’ function did change its behavior during PHP5. https://php.net/manual/en/function.empty.php

    Plugin has been updated to support PHP7.2 and WP 5.1.1. These two were the cause for a lot of the recent bugs.

    Please let me know if the issue persists with the latest version of BLC.

    Cheers,
    Nemanja

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php errors’ is closed to new replies.