Skip to content
Snippets Groups Projects
Commit 0ef46138 authored by Tomasz Wolniewicz's avatar Tomasz Wolniewicz
Browse files

Fixes to API

parent 870121e7
No related branches found
No related tags found
1 merge request!14Fixes to API
......@@ -101,7 +101,7 @@ class API {
foreach ($supportedOptions as $opt) {
$this->assignOpt($opt);
}
// print_r($this->opts);
Utils::debug(5, $this->opts, "OPTS: ", "\n");
}
private function optionError($optName) {
......@@ -300,15 +300,18 @@ class API {
if ($optValue != 1 && $optValue != 2) {
$optValue = 0;
}
break;
case 'details':
if ($optValue != 1) {
$optValue = 0;
}
break;
case 'valid_sec':
$optValue = filter_var($optValue, FILTER_SANITIZE_NUMBER_INT);
if ($optValue == '') {
$optValue = 0;
}
break;
default:
}
$this->opts[$optName] = $optValue;
......@@ -608,7 +611,6 @@ class API {
if ($this->opts['help'] == 1) {
return "";
}
Utils::debug(5, $this->opts, "OPTS: ", "\n");
$edugain = new eduGAIN(5, $this->fed_id, true);
$edugain->load_federations_state();
if ($this->opts['only_errors'] > 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment