Fixing array issues for some older versions of PHP