Modifying post_type_link hook messing up edit function for a custom post

Modifying post_type_link hook messing up edit function for a custom post

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