Explorar o código

Merge pull request #519 from jhfrintrop/patch-1

Fix call to undefined method forceRootUrl in lumen
Shalvah %!s(int64=6) %!d(string=hai) anos
pai
achega
c98201c63a
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  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";
         }