Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3914429
D196.id466.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
749 B
Referenced Files
None
Subscribers
None
D196.id466.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D196: Provide a void Services instance as fallback
Attached
Detach File
Event Timeline
Log In to Comment