From 4e33586e6cf6baf3a857e8ec6bd6de2ae4f93ad9 Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 9 Jan 2020 15:17:16 +0100 Subject: [PATCH] Fix undefined property in WithFaker (#31083) --- src/Illuminate/Foundation/Testing/WithFaker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Foundation/Testing/WithFaker.php b/src/Illuminate/Foundation/Testing/WithFaker.php index fbcfc7687e30..ed0189afbc36 100644 --- a/src/Illuminate/Foundation/Testing/WithFaker.php +++ b/src/Illuminate/Foundation/Testing/WithFaker.php @@ -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]); }