the symptom you are seeing is likely due to a page being requested twice, once with and once without the expected input data. and given that you are doing url rewriting, with your locahost/easy/u/5, this is even more likely.
if you look in your web server's access log, i'm betting you have two requests for your page, one with and one without the correct get query string on it. you may even have a get query string that has added a space character as part of the value. if so, it's possibly due to a faulty url rewriting rule, or your page redirecting to itself a second time, or the browser requesting the page twice.
however, ALL code should ALWAYS validate data before trying to use it. you need to make sure there's an expected value for the user id before ever calling the class method. making sure that the value contains all numerical characters (see ctype_digit()) and is not an empty string will at least verify that it contains a likely user id.
also, why are you using a default $user_id = null call time parameter for a function that requires a value for that parameter to work (defining default parameter values are intended for optional parameters, where the function will still perform its intended purpose when the parameter is not present), assigning one variable to another ($user = $user_id;), and then looping over a result set that by definition will at most be one row? when we see code that contains extra lines and statements that don't accomplish anything useful, we wonder what you were thinking when you typed those things into your code? code should just contain those things that are necessary and that contribute to the goal that code is trying to accomplish.
multi-purpose programming fool. well written source-code should be self-documenting. well written code should be self-troubleshooting.