diff --git a/src/Illuminate/Foundation/Console/stubs/exception-render-report.stub b/src/Illuminate/Foundation/Console/stubs/exception-render-report.stub index 712a40789e76..4d1070c2f687 100644 --- a/src/Illuminate/Foundation/Console/stubs/exception-render-report.stub +++ b/src/Illuminate/Foundation/Console/stubs/exception-render-report.stub @@ -9,7 +9,7 @@ class DummyClass extends Exception /** * Report the exception. * - * @return void + * @return bool|null */ public function report() { diff --git a/src/Illuminate/Foundation/Console/stubs/exception-report.stub b/src/Illuminate/Foundation/Console/stubs/exception-report.stub index 8db5c4f3c2b2..643149863e91 100644 --- a/src/Illuminate/Foundation/Console/stubs/exception-report.stub +++ b/src/Illuminate/Foundation/Console/stubs/exception-report.stub @@ -9,7 +9,7 @@ class DummyClass extends Exception /** * Report the exception. * - * @return void + * @return bool|null */ public function report() { diff --git a/src/Illuminate/View/ViewException.php b/src/Illuminate/View/ViewException.php index 9c9463bc28ac..e6797a29a1e7 100644 --- a/src/Illuminate/View/ViewException.php +++ b/src/Illuminate/View/ViewException.php @@ -3,21 +3,25 @@ namespace Illuminate\View; use ErrorException; +use Illuminate\Container\Container; +use Illuminate\Support\Reflector; class ViewException extends ErrorException { /** * Report the exception. * - * @return void + * @return bool|null */ public function report() { $exception = $this->getPrevious(); - if ($exception && method_exists($exception, 'report')) { - $exception->report(); + if (Reflector::isCallable($reportCallable = [$exception, 'report'])) { + return Container::getInstance()->call($reportCallable); } + + return false; } /**