kohana/minion — pull request #101 by cyrgit (2014-10-31 14:01:24+00:00)
Title: When associative array, $options[0] is undefined

When $options contains the 'task' key in its associative array form, an exception will be thrown when trying to access $options[0]:

ErrorException [ 8 ]: Undefined offset: 0 ~ DOCROOT/vendor/kohana/minion/classes/Kohana/Minion/Task.php [ 105 ]

To replicate this independently of Minion's implementation, try running this:

php -r "echo ['task'=>'foo']['task'];" // Will correctly print out "task"

php -r "echo ['task'=>'foo'][0];" // Will throw PHP Notice: Undefined offset: 0 in Command line code on line 1