Short_title character problem

Use mb_strlen(), not strlen().
The same with mb_substr() and substr(): Your title contains multi-byte characters, but strlen() and substr() do not work on characters, they work on single bytes.

For a improved function to shorten strings see this answer.

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