add_action init breaks site on PHP 7.1

I changed the master function to:

function master() {
    updates();
    remove_core_updates();
    hide_plugins($plugins);
    nstrm_remove_admin_submenus();
}

Now it works. Is this the right way to to it?

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