Layman's Terms
CakePHP is being told to apply an array of parameters to a collection of objects, such that each particular object can modify the parameters sent on to the next object. There is an error in how CakePHP is being told to do this.
In Depth
Generically, this rises from the CakePHP event publication mechanism. Somewhere in your code is an instance of ObjectCollection
, which is being triggered with certain parameters. That is, a method is being called on every object in that collection.
Each callback method is given parameters. Originally the parameters are passed into trigger()
. In normal cases (where modParams
is false), every callback gets the same parameters. But when modParams
is not strictly false, the result of each callback overwrites the parameter indicated by modParams
.
So if there are two objects in the collection, modParams is 1, and the params[1] is 'a' initially, then the callback is given the first object with params[1] == a. That callback returns 'b', so when the next callback is called, the second object gets params[1] == b.
The exception raises when the modParams
value given does not exist in the originally given params
. Eg, if modParams
is 2 and params
is array (0 => 'a', 1 => 'b')
, you'll get this exception.
In your case
Specifically, debugging this has to be done at a low-level because it's a method on a generic class. The backtrace from the Exception should get you bubbled up to a trigger()
call on a particular concrete class. That call is being given non-false modParams
and a params
that doesn't have the given modParams
. It could be a code bug in a concrete class extending ObjectCollection
, or it could simply be a generic message arising from a method not being given expected arguments.