mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-01-11 16:58:58 +01:00
Prevent exception if the requested Option does not exist
This commit is contained in:
parent
fc05d41120
commit
b113109340
@ -32,7 +32,12 @@ public static function get($option = null)
|
||||
// fallback values for every options
|
||||
$options = collect(config('app.options'))->merge($userOptions);
|
||||
|
||||
return !is_null($option) ? $options[$option] : $options;
|
||||
if( $option ) {
|
||||
|
||||
return isset($options[$option]) ? $options[$option] : null;
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user