Try using [] instead of array() to be consistent with the rest of the new code. This line is copy pasted several times, so it should just be a global replace