Skip to content

Commit

Permalink
Merge pull request #1722 from codeigniter4/seederfix
Browse files Browse the repository at this point in the history
Seeder adds default namespace to seeds
  • Loading branch information
lonnieezell authored Feb 14, 2019
2 parents 4ff1f5b + a0dad38 commit ccce786
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions system/Database/Seeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ public function call(string $class)
throw new \InvalidArgumentException('The specified Seeder is not a valid file: ' . $path);
}

// Assume the class has the correct namespace
$class = APP_NAMESPACE . '\Database\Seeds\\' . $class;

if (! class_exists($class, false))
{
require_once $path;
Expand Down

0 comments on commit ccce786

Please sign in to comment.