Fix blank page for php 5.3

Switch to using array_shift instead of array dereferencing (array[0]) as
php 5.3 does not support dereferencing.

Bug 1139632
Merge pull request #14 from ncdc/bz1139632

Fix blank page for php 5.3