The reason for the error you've specified: you refer to a nonexistent array element.
Is this a joke? How to find the line and, accordingly, the cause of the error?
To forget about the existence of errors, and to apply the exceptions.
To validate the input data in each method, always.
The easiest way to find the error with xdebug