im trying make a function to auto correct posts when i open the posts in the backoffice

Ahh, you’re using the wrong action – you need:

add_filter( 'wp_insert_post_data', 'processpost' );

View wp_insert_post source

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