File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -108,16 +108,22 @@ public function getSetting($settingName)
108
108
}
109
109
switch ($ settingName ) {
110
110
case $ this ->jwtHeader :
111
- $ value = api_get_setting ($ settingName )[$ this ->plugin ->getPluginName ()];
111
+ $ settings = api_get_setting ($ settingName );
112
+ $ value = is_array ($ settings ) && array_key_exists ($ this ->plugin ->getPluginName (), $ settings )
113
+ ? $ settings [$ this ->plugin ->getPluginName ()]
114
+ : null ;
115
+
112
116
if (empty ($ value )) {
113
117
$ value = 'Authorization ' ;
114
118
}
115
119
break ;
116
120
case $ this ->documentServerInternalUrl :
117
- $ value = api_get_setting ($ settingName )[$ this ->plugin ->getPluginName ()];
121
+ $ settings = api_get_setting ($ settingName );
122
+ $ value = is_array ($ settings ) ? ($ settings [$ this ->plugin ->getPluginName ()] ?? null ) : null ;
118
123
break ;
119
124
case $ this ->useDemoName :
120
- $ value = api_get_setting ($ settingName )[0 ];
125
+ $ settings = api_get_setting ($ settingName );
126
+ $ value = is_array ($ settings ) ? ($ settings [0 ] ?? null ) : null ;
121
127
break ;
122
128
case $ this ->jwtPrefix :
123
129
$ value = 'Bearer ' ;
You can’t perform that action at this time.
0 commit comments