Unable to write error_log output… but only from a certain function

Turns out I was looking in the wrong error_log file. Doh!

For anyone else who has this problem, remember to also check the error_log located in the wp_admin folder. Not just the one in WordPress root.

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