Page MenuHomeDevCentral

D196.id466.diff
No OneTemporary

D196.id466.diff

diff --git a/app/Providers/ServicesServiceProvider.php b/app/Providers/ServicesServiceProvider.php
--- a/app/Providers/ServicesServiceProvider.php
+++ b/app/Providers/ServicesServiceProvider.php
@@ -11,13 +11,15 @@
* Registers the application services.
*
* @return void
- *
- * @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
public function register() {
$this->app->singleton('services', function ($app) {
$path = config('services.gate.credentials');
- return Services::loadFromJson($path);
+ if ($app->make('filesystem')->has($path)) {
+ return Services::loadFromJson($path);
+ }
+
+ return new Services;
});
}
}

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 14:45 (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2308098
Default Alt Text
D196.id466.diff (749 B)

Event Timeline