• Resolved el_capo_el_capo

    (@el_capo_el_capo)


    Today WP Customer Area doesn’t work suddenly.
    I can see the error in admin area header: Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /var/www/vhosts/———/httpdocs/wp-content/plugins/customer-area/src/php/core-addons/post-owner/helpers/post-owner-ajax-helper.class.php on line 67.

    Ok, line 67 is:
    else if (is_a($user_id, WP_User::class))

    And this line is located in function:
    public function get_user_display_value($user_id, $context = ”)
    {
    if (0 !== (int)($user_id))
    {
    $user = new WP_User($user_id);
    }
    else if (is_a($user_id, WP_User::class))
    {
    $user = $user_id;
    }
    else
    {
    return ‘INVALID ARGUMENT passed to get_user_display_value’;
    }

    return apply_filters(‘cuar/core/ajax/user-search/display-result’,
    $user->display_name,
    $user,
    $context);
    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • I just downloaded the plugin for the first time and upon attempt to activate got the same error. Fatal error, unable to activate.

    Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{‘ or ‘$’ in /home/ecologic/public_html/development/wp-content/plugins/customer-area/src/php/core-addons/post-owner/helpers/post-owner-ajax-helper.class.php on line 67

    How to resolve? I just upgraded to WordPress 4.9.5.

    Thanks! Joel.

    Hey I just found the solution here:
    https://wp-customerarea.com/support/topic/fatal-error-after-update-v7-5-0/

    The error is fixed when PHP is upgraded to 5.5+

    Joel.

    Thread Starter el_capo_el_capo

    (@el_capo_el_capo)

    Perfect. The solution is update PHP in server to 5.5 or higher

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

The topic ‘It does not work suddenly. Error in PHP’ is closed to new replies.