Commit a1c7dde0 authored by Joost Koehoorn's avatar Joost Koehoorn

Fixed problem with manual running of Artisan tasks

When running an Artisan task from within your application using `Command::run`, it fails when the same task is ran more than once. Every time the task is resolved, its file is included using `require` leading to duplicate class definitions. By using `require_once` this problem is avoided.
parent ec13efb7
......@@ -125,7 +125,7 @@ class Command {
// the requested method may be executed.
if (file_exists($path = Bundle::path($bundle).'tasks/'.$task.EXT))
{
require $path;
require_once $path;
$task = static::format($bundle, $task);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment