(bug 42727) Fix incorrect usage of array_shift().

Change-Id: I6fdff81c1c61c09aae942ec4515ceea57c8eed64
Merge "(bug 42727) Fix incorrect usage of array_shift()."