mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-24 22:12:06 +02:00
Prevent exception if the requested Option does not exist
This commit is contained in:
parent
fc05d41120
commit
b113109340
@ -32,7 +32,12 @@ class Options
|
||||
// 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…
x
Reference in New Issue
Block a user