It is all looking OK to me.
Did you fully remove all custom modules, custom files etc before upgrading?
Did you then test the site before fixing and then putting them back after the upgrade?
Want me to return to backup installation?
I wouldn’t do that. It looks like a minor error in some old code that should not still be there to me. The database has been changed, so your backup might be worse.