Illegan string offset 'state' error

Home Forums Pie-Register 2.0 Support Illegan string offset 'state' error

This topic contains 2 replies, has 3 voices, and was last updated by  Hasnain Abbas 2 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3634

    christi
    Participant

    I’m getting this at the top of my registration form. All of the functions are still working correctly that I can tell but this appears.

    Illegal string offset ‘state’ in /home/mwpageants/public_html/wp-content/plugins/pie-register/classes/registration_form.php on line 412

    Apply Now

    #4441

    Murtaza Basrai
    Participant

    Hi Christi,
    I’m facing the same error.
    However I used the following solution:

    Replaced Line 412 in registration_form.php
    from

    $selectedoption = ($address_values[‘state’])?$address_values[‘state’]:$this->field[‘us_default_state’];

    to

    if (isset($address_values[‘state’])) {
    $selectedoption = ($address_values[‘state’])?$address_values[‘state’]:$this->field[‘us_default_state’];
    }

    #4462

    Hasnain Abbas
    Keymaster

    Hi,

    Here’s the appropriate way:

    if (isset($address_values[‘state’])) {
    $selectedoption = $address_values[‘state’];
    }else{
    $selectedoption = $this->field[‘us_default_state’];
    }

    Thanks

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

You must be logged in to reply to this topic.