Passing stored variables to add_filter

Most obvious reason could be the fact wpseo_title filter is firing before you have saved your title. Try moving title_storage() call on a earlier stage like. The wp action should be a good candidate.

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