Thanks Ray, I tried out the updated script and more errors surfaced - so I will take your advice and 'downgrade' the PHP version. I checked with my Host provider and it is possible, though I do end up paying an extra support fee.
I will update this message once I have completed the necessary steps.
Thanks - regards, Don