• Hi there

    I get this warning messages:
    Warning: Illegal string offset ‘formId’ in C:\xampp\htdocs\wp-content\plugins\repeater-add-on-for-gravity-forms\class-gf-field-repeater.php on line 287

    Warning: Illegal string offset ‘children’ in C:\xampp\htdocs\wp-content\plugins\repeater-add-on-for-gravity-forms\class-gf-field-repeater.php on line 291

    This is because the code it is trying to use a string like an array so my solution was add this line in 287:
    $value = array();

    this is the piece of code you must change:

    			if (empty($value)) {
    				$value = array();
    				$value['formId'] = $form_id;
    				if (!empty($repeater_start)) { $value['start'] = $repeater_start; }
    				if (!empty($repeater_min)) { $value['min'] = $repeater_min; }
    				if (!empty($repeater_max)) { $value['max'] = $repeater_max; }
    				if (!empty($repeater_children)) { $value['children'] = $repeater_children; }
    
    				$value = json_encode($value);
    			}

    Hope this help

    • This topic was modified 7 years, 8 months ago by hartum.
    • This topic was modified 7 years, 8 months ago by hartum.
  • The topic ‘Warning illegal string offset (Solution)’ is closed to new replies.