Skip to content

Commit

Permalink
Fix undefined property in WithFaker (#31083)
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints authored and taylorotwell committed Jan 9, 2020
1 parent aec5948 commit 4e33586
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Testing/WithFaker.php
Expand Up @@ -45,7 +45,7 @@ protected function makeFaker($locale = null)
{
$locale = $locale ?? config('app.faker_locale', Factory::DEFAULT_LOCALE);

if ($this->app->bound(Generator::class)) {
if (isset($this->app) && $this->app->bound(Generator::class)) {
return $this->app->make(Generator::class, [$locale]);
}

Expand Down

0 comments on commit 4e33586

Please sign in to comment.