• Resolved Noel Kelly

    (@noel-kelly)


    PHP message: PHP Warning: Attempt to read property “post_type” on null in /www/visualartistsireland40_315/public/wp-content/plugins/advanced-post-block-pro/includes/admin/CustomPost.php on line 116″

    That PHP warning means your site is trying to access a property (post_type) on a null object, which usually means that no post was available when the code expected one.🔍 Breakdown of the Error

    • Plugin: Advanced Post Block Pro
    • File: /includes/admin/CustomPost.php
    • Line: 116
    • Message: “Attempt to read property ‘post_type’ on null”

    This usually happens when the plugin calls something like:

    php

    $post_type = $post->post_type;

    …but $post is null at that moment — maybe because the code runs outside the WordPress loop or before global $post is set.

    Can this be fixed as our error logs are filling up with Advanced Post Block Pro errors.

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

The topic ‘PHP code errors’ is closed to new replies.