This is not anymore valid in version of php on 2.1++.
YOu have to set the 'gps' to array explicitly.

The same holds for the below code where you do not check if the 'gps' is an array.