Syntax error on latest update (20 nov) - by nickson

This topic has 6 replies, 2 voices, and was last updated 6 years, 4 months ago ago by Olga Barlow

  • Avatar: nickson
    nickson
    Participant
    November 20, 2017 at 12:39

    Hello there, after last update there seems to be a syntax error in the theme on my platform.

    Parse error: syntax error, unexpected ‘[‘ in ……mywebsite……/public_html/wp-content/themes/xstore/theme/custom-styles.php on line 313

    This is the line of code:

    $menu_links_border_style = etheme_get_option(‘menu-border-style’)[‘border-style’];
    $menu_links_border_style_hover = etheme_get_option(‘menu-border-style-hover’)[‘border-style’];
    $menu_dropdown_border_style = etheme_get_option(‘menu_dropdown_border_style’)[‘border-style’];
    $header_bg = etheme_get_custom_field(‘header_bg’, $post_id[‘id’]);
    $header_bg_transparent = etheme_get_custom_field(‘header_transparent’, $post_id[‘id’]);
    if ( $header_bg_transparent ) {
    $header_bg = ‘transparent’;
    }

    After removing [‘border-style’]from above code my website seems to be functioning again.

    Is this going to be resolved in future updates or is this something I can resolve myself?
    As I am running on a somewhat older PHP version as my previous (live) website can’t handle a higher version. Once I completed this new website I am upgrading the php version.

    5 Answers
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 20, 2017 at 14:56

    Hello,

    Tell me what version of PHP do you use?

    Regards

    Avatar: nickson
    nickson
    Participant
    November 20, 2017 at 17:36

    Cant see this right now. But can this give this syntax error? Because then all I need is to upgrade my php version once completing the website.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 21, 2017 at 09:29

    Hello,

    PHP version can be the reason but we want to be sure and need to test. So, go to WooCommerce > Status > check the version and let me know.

    Regards

    Avatar: nickson
    nickson
    Participant
    November 22, 2017 at 11:50

    Its low i know, but it is 5.3.29 currently.
    I have this version because its the latest version my current website is working on right now.

    Also the reason why im creating a new website.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    November 22, 2017 at 15:19

    Hello,

    Yes, it could be the reason. If you plan to update PHP version then inform me if you still have this problem after the update. Because you are the first who reported such error.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.