Support » Plugin: Gravity Forms + Custom Post Types » [BUG] PHP Deprecated Notice

  • Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /wp-content/plugins/gravity-forms-custom-post-types/gfcptaddon_1-5.php on line 44

    Error says it all, plugin should probably use isset(); instead.

    Kind Regards
    – Allan

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m also experiencing this issue. Line 43 – 51 in gfcptaddon_1-5.php should be this:

    
    function get_field_taxonomy( $field ) {
        if ( isset( $field->populateTaxonomy ) ) {
            return $field->populateTaxonomy;
        } elseif ( isset( $field->populateTaxonomy ) ) {
            return $field->populateTaxonomy;
        }
    
        return false;
    }
    

    Line 32 – 38 should be this:

    
    function get_field_post_type( $field ) {
        if ( isset( $field->populatePostType ) ) {
            return $field->populatePostType;
        }
    
        return false;
    }
    

    You can test it while running PHP 7.4.x

    Looking forward to a fix for this issue as well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.