It does not work suddenly. Error in PHP
-
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);
}
The topic ‘It does not work suddenly. Error in PHP’ is closed to new replies.