This repository was archived by the owner on Mar 14, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ protected function fixConfig()
3838 collect (Arr::dot (config ()->all ()))->filter (function ($ item ) {
3939 return is_string ($ item ) && Str::startsWith ($ item , Credentials::CONFIG_PREFIX );
4040 })->map (function ($ item , $ key ) {
41- $ item = str_replace_first (Credentials::CONFIG_PREFIX , '' , $ item );
41+ $ item = Str:: replaceFirst (Credentials::CONFIG_PREFIX , '' , $ item );
4242
4343 config ()->set ($ key , credentials ($ item ));
4444 });
Original file line number Diff line number Diff line change 11<?php
22
33use BeyondCode \Credentials \Credentials ;
4+ use Illuminate \Contracts \Container \BindingResolutionException ;
45
56if (! function_exists ('credentials ' )) {
67 /**
1314 function credentials (string $ key , $ default = null )
1415 {
1516 $ filename = config ('credentials.file ' );
16-
1717 try {
1818 $ credentials = app (Credentials::class);
1919 $ credentials ->load ($ filename );
2020
2121 return $ credentials ->get ($ key , $ default );
22- } catch (ReflectionException $ e ) {
23- return Credentials::CONFIG_PREFIX .$ key ;
22+
23+ } catch (ReflectionException | BindingResolutionException $ e ) {
24+
25+ return Credentials::CONFIG_PREFIX . $ key ;
26+
2427 }
28+
2529 }
2630}
You can’t perform that action at this time.
0 commit comments