Skip to content

Commit 9c78f4e

Browse files
authored
currencies or array
When package is installed and if laravel config is cached the app throws an exception because the currencies returns null.
1 parent cbc66d1 commit 9c78f4e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Provider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ public function boot(): void
2222
], 'money');
2323

2424
Money::setLocale($this->app->make('translator')->getLocale());
25-
Currency::setCurrencies($this->app->make('config')->get('money'));
25+
$currencies = $this->app->make('config')->get('money');
26+
Currency::setCurrencies($currencies ?? []);
2627

2728
$this->registerBladeDirectives();
2829
$this->registerBladeComponents();

0 commit comments

Comments
 (0)