瀏覽代碼

Fix call to undefined method forceRootUrl in lumen

Calls to undefined methods are a subclass of `\Error` in PHP 7
Jan-Hendrik Frintrop 6 年之前
父節點
當前提交
d51f8f42bc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Commands/GenerateDocumentation.php

+ 1 - 1
src/Commands/GenerateDocumentation.php

@@ -50,7 +50,7 @@ class GenerateDocumentation extends Command
     {
         try {
             URL::forceRootUrl(config('app.url'));
-        } catch (\Exception $e) {
+        } catch (\Error $e) {
             echo "Warning: Couldn't force base url as Lumen currently doesn't have the forceRootUrl method.\n";
             echo "You should probably double check URLs in your generated documentation.\n";
         }