Support » Plugin: Gravity Forms + Custom Post Types » Invalid argument supplied for foreach() in ../gfcptaddonbase.php on line 126

  • Warning: Invalid argument supplied for foreach() in ../gfcptaddonbase.php on line 126.

    This issue is present on WordPress 5.X, errors are thrown in the “enqueue_custom_scripts” function, caused by the loop not checking the validity of the $form array first.

    This error can be suppressed by adding an is_array($form) check before the loop to ensure the validity of the $form variable.

    Is this plugin still active? As the last tested version was 4.9.10.

    This error was found with the following versions:
    WordPress: 5.1.1,
    Gravity Forms: 2.4.6,
    Gravity Forms + Custom Post Type: 3.1.13

    Thank you for your help,
    Michael.

    • This topic was modified 3 months, 1 week ago by  connectisl.
  • You must be logged in to reply to this topic.