Title: Warning: Illegal String Offset &#039;text_string&#039;
Last modified: August 24, 2016

---

# Warning: Illegal String Offset 'text_string'

 *  Resolved [rivalarrival](https://wordpress.org/support/users/rivalarrival/)
 * (@rivalarrival)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-text_string/)
 * Version 1.6.1, downloaded today.
 * Plugin performs its intended function properly: captcha works, messages send 
   properly. However, it’s displaying errors. Any page where the form is called 
   displays the following above the form:
 * > Warning: Illegal string offset ‘text_string’ in /home/public/wordpress/wp-content/
   > plugins/contact-form-with-captcha/cfwc-main.php on line 270
   > Warning: Illegal string offset ‘text_string’ in /home/public/wordpress/wp-content/
   > plugins/contact-form-with-captcha/cfwc-main.php on line 271
 * On settings > contact form with captcha, down at the bottom I get:
 * > Do not give credit to developer (Please consider NOT checking this box) Warning:
   > Illegal string offset ‘text_string’ in /home/public/wordpress/wp-content/plugins/
   > contact-form-with-captcha/cfwc-main.php on line 197
   >  /> Pick a reCaptcha theme
   > Warning: Illegal string offset ‘text_string’ in /home/public/wordpress/wp-content/
   > plugins/contact-form-with-captcha/cfwc-main.php on line 202 />Red Warning: 
   > Illegal string offset ‘text_string’ in /home/public/wordpress/wp-content/plugins/
   > contact-form-with-captcha/cfwc-main.php on line 203 />white Warning: Illegal
   > string offset ‘text_string’ in /home/public/wordpress/wp-content/plugins/contact-
   > form-with-captcha/cfwc-main.php on line 204 />Blackglass Warning: Illegal string
   > offset ‘text_string’ in /home/public/wordpress/wp-content/plugins/contact-form-
   > with-captcha/cfwc-main.php on line 205 />Clean Pick a form theme Warning: Illegal
   > string offset ‘text_string’ in /home/public/wordpress/wp-content/plugins/contact-
   > form-with-captcha/cfwc-main.php on line 211 />Parallel Warning: Illegal string
   > offset ‘text_string’ in /home/public/wordpress/wp-content/plugins/contact-form-
   > with-captcha/cfwc-main.php on line 212 />Stacked
 * Googling “illegal string offset cfwc-main.php on line 270” lists 30+ sites displaying
   this problem, but no resolution.
 * I’m guessing it’s related to using 4.2.2 instead of 4.1.5?
 * [https://wordpress.org/plugins/contact-form-with-captcha/](https://wordpress.org/plugins/contact-form-with-captcha/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [nerdess](https://wordpress.org/support/users/nerdess/)
 * (@nerdess)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-text_string/#post-6173968)
 * I have the exact same problem as described by rivalarrival
 *  [nerdess](https://wordpress.org/support/users/nerdess/)
 * (@nerdess)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-text_string/#post-6173969)
 * so i figured out: the issue is cos of sloppy code 😉 either switch off the display
   of php warnings or change cfwc-main.php so that you check in the affected lines
   if $options[‘text_string’] actually exists. like e.g. so in line 214:
 * before:
    `if ("parallel" == $options['text_string'])`
 * better:
    `if (isset($options['text_string']) && "parallel" == $options['text_string'])`
 * ______
 * edit: you can also grab the modified cfwc-main.php file from my github account:
   [https://github.com/nerdess/contact-form-with-captcha/blob/master/cfwc-main.php](https://github.com/nerdess/contact-form-with-captcha/blob/master/cfwc-main.php)
 *  Plugin Author [Technology Blog](https://wordpress.org/support/users/zackhasit/)
 * (@zackhasit)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-text_string/#post-6173995)
 * One of the options should have been set if its not optional.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Warning: Illegal String Offset 'text_string'’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/contact-form-with-captcha_ffffff.
   svg)
 * [Contact Form With Captcha](https://wordpress.org/plugins/contact-form-with-captcha/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-with-captcha/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-with-captcha/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-with-captcha/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-with-captcha/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-with-captcha/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Technology Blog](https://wordpress.org/support/users/zackhasit/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/warning-illegal-string-offset-text_string/#post-6173995)
 * Status: resolved