Error: Undefined offset: 1 — I can't find the cause of the error?

In the console run the script, like this
/console-script controller/action
I get this error:
Error: Undefined offset: 1
Is this a joke? How to find the line and, accordingly, the cause of the error?
In php log, nothing.
July 2nd 19 at 13:59
1 answer
July 2nd 19 at 14:01
Solution
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

Find more questions by tags PHPYiiDebugging