I managed to answer my own question.
To stop the error coming up, I changed this line:
PHP Code:
foreach ($this->results AS $location)
to this:
PHP Code:
foreach((array)$this->results AS $location)
I don't know whether this is suppressing the error or solving the problem that was causing the error to come up but the end result is what I wanted, so I'm going to leave it at that.
You can see the Store Locator in action at
www.healthplus.co.uk/locator.php.