• Resolved rogiervanroon

    (@rogiervanroon)


    Great plug-in, but needs an update for PHP 7.4:

    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 33, 44, and 46

    • This topic was modified 4 years, 10 months ago by rogiervanroon.
    • This topic was modified 4 years, 10 months ago by rogiervanroon.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Same here with PHP 7.4, looking forward to an official update, however, in the meantime…

    File:
    /wp-content/plugins/gravity-forms-custom-post-types/gfcptaddon_1-5.php

    Change line 33 as follows:

    ////      if (array_key_exists('populatePostType', $field)) {
              if (property_exists($field,'populatePostType')) {

    Change line 44 as follows:

    ////      if (array_key_exists('populateTaxonomy', $field)) {
    	      if (property_exists( $field,'populateTaxonomy')) {

    Change line 46 as follows:

    ////          } else if (array_key_exists('saveToTaxonomy', $field)) {
              } else if (property_exists( $field,'saveToTaxonomy')) {
    • This reply was modified 4 years, 10 months ago by Joe. Reason: Solution provided

    Any update on this? Just got an urgent message from a client after this issue broke their site…

    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 46

    please update this

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘array_key_exists deprecated in PHP 7.4’ is closed to new replies.