File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,16 @@ function Run()
4545 $ ldir = parent ::getParameterValue ('indir ' );
4646 $ odir = parent ::getParameterValue ('outdir ' );
4747 if (parent ::getParameterValue ('omim_api_key ' ) == '' ) {
48- if (parent ::getParameterValue ('omim_api_key_file ' ) != '' ) {
49- if (file_exists (parent ::getParameterValue ('omim_api_key_file ' ))) {
50- $ key = file_get_contents (parent ::getParameterValue ('omim_api_key_file ' ));
51- if ($ key ) {
52- parent ::setParameterValue ('omim_api_key ' , $ key );
53- } else {
54- trigger_error ("No OMIM key has been provided either by commmand line or in the expected omim key file " ,E_USER_WARNING );
55- }
48+ $ key_file = parent ::getParameterValue ('omim_api_key_file ' );
49+ if (file_exists ($ key_file )) {
50+ $ key = file_get_contents ($ key_file );
51+ if ($ key ) {
52+ parent ::setParameterValue ('omim_api_key ' , $ key );
53+ } else {
54+ trigger_error ("No API key found in the specified omim key file $ key_file " ,E_USER_WARNING );
5655 }
56+ } else {
57+ trigger_error ("No OMIM key has been provided either by commmand line or in the expected omim key file $ key_file " ,E_USER_WARNING );
5758 }
5859 }
5960
You can’t perform that action at this time.
0 commit comments