• Resolved rivalarrival

    (@rivalarrival)


    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://ww.wp.xz.cn/plugins/contact-form-with-captcha/

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

    (@nerdess)

    I have the exact same problem as described by rivalarrival

    nerdess

    (@nerdess)

    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

    Plugin Author Technology Blog

    (@zackhasit)

    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.