Initialise $val array
Merge pull request #2148 from GDmac/2.0

Initialise $val array