I don't think you need the require here because array will throw array index out of bound anyway.