Title: Warning illegal string offset (Solution)
Last modified: July 20, 2017

---

# Warning illegal string offset (Solution)

 *  [hartum](https://wordpress.org/support/users/hartum/)
 * (@hartum)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/warining-illegal-string-offset-solution/)
 * 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 8 years, 10 months ago by [hartum](https://wordpress.org/support/users/hartum/).
    -  This topic was modified 8 years, 10 months ago by [hartum](https://wordpress.org/support/users/hartum/).

The topic ‘Warning illegal string offset (Solution)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/repeater-add-on-for-gravity-forms_f9f9f9.
   svg)
 * [Gravity Forms Repeater Add-On](https://wordpress.org/plugins/repeater-add-on-for-gravity-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/repeater-add-on-for-gravity-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/repeater-add-on-for-gravity-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/repeater-add-on-for-gravity-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/repeater-add-on-for-gravity-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/repeater-add-on-for-gravity-forms/reviews/)

## Tags

 * [illegal string](https://wordpress.org/support/topic-tag/illegal-string/)
 * [offset](https://wordpress.org/support/topic-tag/offset/)

 * 0 replies
 * 1 participant
 * Last reply from: [hartum](https://wordpress.org/support/users/hartum/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/warining-illegal-string-offset-solution/)
 * Status: not resolved