trim must not be used in empty in PHP < 5.5