Don't throw errors when fetching settings etc
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
class Setting extends Eloquent {
|
||||
public static function get($settingName) {
|
||||
return self::where('name', $settingName)->first()->value;
|
||||
try {
|
||||
$setting = self::where('name', $settingName)->first()->value;
|
||||
} catch (ErrorException $e) {
|
||||
$setting = null;
|
||||
}
|
||||
|
||||
return $setting;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user