It seems strpos() is used instead of rtrim()