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.
This commit is contained in:
parent
ec13efb743
commit
a1c7dde08b
|
@ -125,7 +125,7 @@ public static function resolve($bundle, $task)
|
||||||
// the requested method may be executed.
|
// the requested method may be executed.
|
||||||
if (file_exists($path = Bundle::path($bundle).'tasks/'.$task.EXT))
|
if (file_exists($path = Bundle::path($bundle).'tasks/'.$task.EXT))
|
||||||
{
|
{
|
||||||
require $path;
|
require_once $path;
|
||||||
|
|
||||||
$task = static::format($bundle, $task);
|
$task = static::format($bundle, $task);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue