use is_callable instead of method_exists.

This commit is contained in:
Taylor Otwell
2012-02-13 11:06:27 -06:00
parent 09da91501d
commit 2713ee9b87

View File

@@ -42,7 +42,7 @@ class Command {
throw new \Exception("Sorry, I can't find that task."); throw new \Exception("Sorry, I can't find that task.");
} }
if(method_exists($task, $method) or method_exists($task, '__call')) if(is_callable(array($task, $method)))
{ {
$task->$method(array_slice($arguments, 1)); $task->$method(array_slice($arguments, 1));
} }