Fix 502 bad gateway error for qrlogin

This commit is contained in:
tokslaw7
2023-12-15 01:52:25 +00:00
parent 73843b6abc
commit c94f8b24a0
+6 -2
View File
@@ -23,24 +23,28 @@ class BackendModel extends Model
public function wrenchboard_api($in, &$out = array()) {
log_message('critical', "wrenchboard_api-STARTING" );
$ret = -1;
$this->wrenchboard_load();
if (!is_array($in)) {
$in = array();
}
if (!is_array($out)) {
$out = array();
}
if (self::DEBUG_API_CALLS) {
$stack = debug_backtrace();
$log = json_encode($stack);
log_message('critical', "wrenchboard_api-FAIL".serialize($log) );
error_log($log);
log_message('critical', "wrenchboard_api-FAIL".$log );
error_log(json_encode($in));
}
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
return $ret;
}