• Resolved gregtech

    (@gregtech)


    <br />
    <b>Notice</b>:  Undefined variable: feed in <b>/nas/content/live/gtirise/wp-content/plugins/gravityforms-hubspot/src/Base.php</b> on line <b>253</b><br />
    {"status":200,"response":{"is_valid":true,"page_number":0,"source_page_number":1,"confirmation_message":"<div id='gform_confirmation_wrapper_2' class='gform_confirmation_wrapper '><div id='gform_confirmation_message_2' class='gform_confirmation_message_2 gform_confirmation_message'>Thanks for contacting us! We will get in touch with you shortly.<\/div><\/div>","confirmation_type":"message","entry_id":"21"}}

    Get this error when trying to submit a form

    Just by playing around around I commented out the rgars if statement on that line of code… The form submits fine and all the data flows into hubspot still.

    // rgars is a pain when my trying to debug with existing data, this is to override that, and it's redundant for checks
        protected function getValue($data, $field)
        {
            $data = (array)$data;
    
            /*
    
            Commented out here by Greg to test
    
            if (function_exists('rgars') && rgars($feed, 'meta/formID')) {
                return rgars($feed, 'meta/formID');
            }
    
            */
    
            $fieldArray = explode('/', $field);
            if (isset($data[$fieldArray[0]])) {
                $data = (array)$data[$fieldArray[0]];
    
                if (count($fieldArray) == 1) {
                    if (is_array($data)) {
                        return $data[0];
                    }
    
                    return $data;
                }
    
                return $this->getValue($data, implode('/', array_slice($fieldArray, 1)));
            }

    I see your comment that the rgars as annoying and for redundancy so not sure what the next steps are to do.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Undefined Variable – Error in Base.php line 253’ is closed to new replies.