Skip to content

Commit c560855

Browse files
committed
Patch: Summernote json file check existence
1 parent 576cab9 commit c560855

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/PanicHDServiceProvider.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,10 +189,12 @@ public function boot()
189189
// $editor_options = $user_editor != "0" ? $user_editor : file_get_contents(base_path(Setting::grab('summernote_options_json_file')));
190190
if ($user_editor != '0') {
191191
$editor_options = $user_editor;
192-
} elseif (Setting::grab('summernote_options_json_file') == 'default') {
193-
$editor_options = file_get_contents(realpath(__DIR__).'/JSON/summernote_init.json');
194-
} else {
192+
193+
}elseif (Setting::grab('summernote_options_json_file') != 'default' and file_exists(base_path(Setting::grab('summernote_options_json_file')))) {
195194
$editor_options = file_get_contents(base_path(Setting::grab('summernote_options_json_file')));
195+
196+
} else {
197+
$editor_options = file_get_contents(realpath(__DIR__).'/JSON/summernote_init.json');
196198
}
197199

198200
$view->with(compact('editor_locale', 'editor_options'));

0 commit comments

Comments
 (0)