fatal erro in one line if statment in wordpress plugin [Solved]

You are using the ternary operator incorrectly to simplify your code – it doesn’t use/need the if(), use it as follows:

echo (strlen($current_user->user_firstname) == 0) ? $current_user->display_name : $current_user->user_firstname;