PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

gform_after submission bug

  1. GravityForms Version 1.6.10

    in form_display.php in function process_form line 13 $lead variable is assigned

    $lead = array();

    later in process_form function on line 80 $lead varible is passed to handle_submission function

    $confirmation = self::handle_submission($form, $lead, $ajax);

    at this point $lead variable is still an empty array. Then in handle_submission function on line 886 $lead is passed to RGFormsModel::save_lead $lead is still empty array()

    RGFormsModel::save_lead($form, $lead);

    Then in forms_model.php in function RGFormsModel::save_lead on line 807 there is

    if($lead == null){

    $lead is still an empty array which is not the same as null so the code that actually inserts the lead into the db never gets called.

    Posted 13 years ago on Monday December 10, 2012 | Permalink
  2. Actually I guess the check should work with an empty array according to the php docs
    http://php.net/manual/en/language.types.null.php

    Posted 13 years ago on Monday December 10, 2012 | Permalink
  3. Is there a specific problem you are having that you need help with, or were you just asking about that specific bit of code and operating on the empty $lead array?

    Posted 13 years ago on Tuesday December 11, 2012 | Permalink