WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
Trying to get property of non object on post-new.php (2 posts)

  1. Ben Balter
    Member
    Posted 2 years ago #

    Api.php line 73 tries to get the ID from the global $post object, without first checking if the $post object exists.

    On initial load of post-new.php, there is no post object, and thus WP errors out if WP_DEBUG is on.

    Can fix by changing to
    if ( !$post )
    return;
    $post_id = $post->ID;

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. Bruz
    Member
    Posted 1 year ago #

    It works! thanks! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic