1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-16 15:01:08 +03:00

Fixing bug when a task doesn't have any config options

This commit is contained in:
Matt Button 2011-01-20 23:53:23 +00:00
parent 0d433aabf4
commit 676f364ecd

View file

@ -105,11 +105,14 @@ class Controller_Minion extends Controller
exit(1); exit(1);
} }
$config = array();
$options = (array) $task->get_config_options(); $options = (array) $task->get_config_options();
$options = empty($options) ? array() : $task->get_config_options(); if( ! empty($options))
{
$config = call_user_func_array(array('CLI', 'options'), $options); $options = $task->get_config_options();
$config = call_user_func_array(array('CLI', 'options'), $options);
}
echo $task->execute($config); echo $task->execute($config);
} }