After replacing both files TP1.2R3 now works without errors on PHP version 7.1.
After succesfully testing it on my test server, I have now moved the code into the productive forum and switched that server to PHP7.1 as well.
So far so good: no error messages in the logs, and the forum operates fine.
I will let it run for a day or so and report back.
Maybe now it is time to release an official version op TP1.2R???