Custom Post Type Rewrite Throws Headers Sent Errors

This happened to a site a friend of mine was working on. Whats weird is that he deleted the problematic file and copied paste the code into a new php file. It seemed to do the trick. worth a shot?

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