Skip to content

Commit 2313c0b

Browse files
committed
added $configfile as global in config_save()
1 parent 19c6ad3 commit 2313c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

update.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function echox($msg, $code = 0) { echo $msg . PHP_EOL; exit($code); }
1010
if(!isset($config['api_url']) || empty($config['api_url'])) echox("missing/wrong api url, exiting", 3);
1111
if(!isset($config['installed_keys'])) $config['installed_keys'] = [];
1212
if(!isset($config['keys_file'])) $config['keys_file'] = 'authorized_keys';
13-
function config_save(){ global $config; file_put_contents($configfile, json_encode($config)); }
13+
function config_save(){ global $configfile, $config; file_put_contents($configfile, json_encode($config)); }
1414

1515
$keys = json_decode(@file_get_contents($config['api_url'], false, stream_context_create(['http' => $config['api_http_options']])), true);
1616
if(strpos($http_response_header[0], '200') === false) echox("invalid response from api: ({$http_response_header[0]}); exiting", 4);

0 commit comments

Comments
 (0)