Upgraded from 3.5 to 3.9.
Now getting following error.
Coding error detected, it must be fixed by a programmer:
events_trigger_legacy() has been deprecated along with all Events 1 API
in favour of Events 2 API.
Mind describing how you are upgrading?
Are you following:
https://docs.moodle.org/39/en/Upgrading
If not a 3rd party plugin issue, 'has been depreciated' sometimes happens when one is trying to upgrade by overwriting core code rather than following the upgrade doc.
Also ... did you research all 3rd party plugins ... not core code ... to see if they have a compatible 3.9.x version before you attempt upgrading?
'SoS', Ken