Browse Source

Merge pull request #519 from jhfrintrop/patch-1

Fix call to undefined method forceRootUrl in lumen
Shalvah 6 years ago
parent
commit
c98201c63a
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/Commands/GenerateDocumentation.php
  2. 1 1
      src/Postman/CollectionWriter.php

+ 1 - 1
src/Commands/GenerateDocumentation.php

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

+ 1 - 1
src/Postman/CollectionWriter.php

@@ -33,7 +33,7 @@ class CollectionWriter
     {
         try {
             URL::forceRootUrl($this->baseUrl);
-        } catch (\Exception $e) {
+        } catch (\Error $e) {
             echo "Warning: Couldn't force base url as your version of Lumen doesn't have the forceRootUrl method.\n";
             echo "You should probably double check URLs in your generated Postman collection.\n";
         }