• Resolved Doug Beney

    (@dougbeney)


    Full error:

    Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, GF_Field_Post_Title given in /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravity-forms-custom-post-types/gfcptaddonbase.php:472 Stack trace: #0 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravity-forms-custom-post-types/gfcptaddonbase.php(442): GFCPTAddonBase->delete_custom_taxonomies(Array, Array) #1 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/class-wp-hook.php(289): GFCPTAddonBase->save_taxonomies(713, Array, Array) #2 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #3 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravityforms/gravityforms.php(6113): do_action('gform_after_cre...', 713, Array, Array, NULL, NULL, NULL, NULL, NULL, NULL, NULL) #5 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravityforms/forms_model.php(4818): gf_do_action('gform_after_cre...', 713, Array, Array) #6 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravityforms/common.php(4241): GFFormsModel::create_post(Array, Array) #7 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravityforms/form_display.php(1533): GFCommon::create_post(Array, Array) #8 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravityforms/form_display.php(153): GFFormDisplay::handle_submission(Array, Array, false) #9 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravityforms/gravityforms.php(632): GFFormDisplay::process_form(6) #10 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/class-wp-hook.php(287): GFForms::maybe_process_form(Object(WP)) #11 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters('', Array) #12 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/plugin.php(551): WP_Hook->do_action(Array) #13 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/class-wp.php(758): do_action_ref_array('wp', Array) #14 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-includes/functions.php(1291): WP->main('') #15 /home/doug/Code/Wordpress/Development-Site/wordpress/wp-blog-header.php(16): wp() #16 /home/doug/Code/Wordpress/Development-Site/wordpress/index.php(17): require('/home/doug/Code...') #17 {main} thrown in /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravity-forms-custom-post-types/gfcptaddonbase.php on line 472
    

    The Solution

    In this file: /home/doug/Code/Wordpress/Development-Site/wordpress/wp-content/plugins/gravity-forms-custom-post-types/gfcptaddonbase.php

    …Add (array) in front of $field on line 472.

    if ( array_key_exists('populateTaxonomy', (array)$field) ) {

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘BUGFIX – Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($arr’ is closed to new replies.