Resolve php 7 exceptions in testing #1462
In php 5 the current testing does not result in any problems. However in PhP7 there are a variety of exceptions reported, listed below. Note that while solving this it will be important to ensure that php 5 is not broken; please test in both php versions.
It would be OK to solve this in a series of PRs, getting rid of different sets of problems each time.