First edit your code it is broken.
Secondly post full stack trace as it seems a problem is somewhere in a call where you are calling on array. I cannot guess where you do that without trace
You are trying to call function from array, add code from where you are calling this function. you can make this function static since you are not using $this or Object inside it.