I cloned the site onto a testing domain and upgraded that one to php 8.2.1 and it worked fine, so I then copied the files back to the correct domain and it all seems to be working as it should - I didn't have to make any changes to the files so can only think there was a propagation delay. Thanks anyway!