WordPress ajax-action failing because of newline in response

Found a plugin ending with ?> with a newline after it

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)