Illegan string offset 'state' error

This topic contains 2 replies, has 3 voices, and was last updated by Avatar Pie Register 3 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10003634
    Avatar
    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

    #10004441
    Avatar
    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’];
    }

    #10004462
    Avatar
    Pie Register
    Participant

    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)

The forum ‘Pie-Register 2.0 Support’ is closed to new topics and replies.

Checkout
0
PURCHASE NOW