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?