WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms + Custom Post Types
[resolved] Catch not filled populateTaxonomy index (2 posts)

  1. Coen Jacobs
    Member
    Posted 3 years ago #

    In the file gfcptaddon_1-5.php the following code is used;

    /*
    * Override. Gets the taxonomy from our new field value
    */
    function get_field_taxonomy( $field ) {
          return $field['populateTaxonomy'];
    }

    When field is not filled, ergo not set, this results in warnings. Should be cleaner to add a if-statement around it, to catch that. Something like this:

    /*
    * Override. Gets the taxonomy from our new field value
    */
    function get_field_taxonomy( $field ) {
            if(isSet($field['populateTaxonomy']))
            {
                	return $field['populateTaxonomy'];
            }
    
            return null;
    }
  2. bradvin
    Member
    Plugin Author

    Posted 3 years ago #

    thanks for pointing this out Coen.
    This has been fixed in version 2.1

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic