• I am receiving these warnings in my log.

    [04-Apr-2022 06:33:21 UTC] PHP Warning: Attempt to read property “post_type” on null in …\wp-content\plugins\breadcrumb-navxt\class.bcn_breadcrumb_trail.php on line 1056
    [04-Apr-2022 06:33:21 UTC] PHP Warning: Attempt to read property “post_type” on null in …\wp-content\plugins\breadcrumb-navxt\class.bcn_breadcrumb_trail.php on line 1056
    [04-Apr-2022 06:33:21 UTC] PHP Warning: Undefined array key “apost__root” in …\wp-content\plugins\breadcrumb-navxt\class.bcn_breadcrumb_trail.php on line 1056

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Havlik

    (@mtekk)

    What kind of page are you visiting when you see this warning? For some reason the queued object ended up being null instead of the expected instance of WP_Post.

    Thread Starter The Servant

    (@avantprime)

    My viewers are visiting the page, so I am not sure which page they are looking at. I just looked in the PHP logs and saw these issues.

    The breadcrumbs are visible on posts, pages and other types?

    Would it be appropriate to apply some defensive coding here to ensure that if those properties are not available it chooses the appropriate path?

    Plugin Author John Havlik

    (@mtekk)

    Ok, in the ideal case, knowing what exactly triggered the behavior can help try to prevent it (could be something that wasn’t caught properly elsewhere). I will be reworking that area of the codebase for the next release and can make it so this warning shouldn’t be possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Warnings’ is closed to new replies.