WordPress.org

Ready to get started?Download WordPress

Forums

Developer's Custom Fields
PHP - property_exists() function throws errors (1 post)

  1. thewebwing
    Member
    Posted 2 years ago #

    When adding a new post to a custom post type, some of the developer custom fields I had defined were throwing errors (note, I have wp_debug set to true). I traced the error and found that when adding a new post, i.e. it does not have an ID yet, property_exists($post, 'ID') coughs up the following error.

    Warning: First parameter must either be an object or the name of an existing class in *domain*/wp-content/plugins/developers-custom-fields/slt-cf-init.php on line 455

    I changed the property_exists function to isset($post->ID) and it seems to be solved. I don't know if this is better, worse, or a wash, but I have stopped the errors.

    Edited to add: This is located in the slt-cf-init.php file.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.