diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-07-31 10:30:54 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-07-31 11:40:25 +0200 |
commit | 4d7e35cc3ba7906e1477b7de423d52a224c37964 (patch) | |
tree | 261103fc1c57a4a949858c3756b024bc4b28c87c | |
parent | 47580ddb30adae1d0f454e1622fbd2ef56d9ace9 (diff) |
#915 do not print misleading API error on web console
Irina reports a raw array showing in the web console when calling the
new ogAdmServer API.
var_export() prints the error message on the web instead of syslog.
Changing var_export() for print_r() solves this bug.
-rw-r--r-- | admin/WebConsole/includes/restfunctions.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php index 159eab48..7f710adf 100644 --- a/admin/WebConsole/includes/restfunctions.php +++ b/admin/WebConsole/includes/restfunctions.php @@ -55,7 +55,7 @@ function common_request($command, $type, $data = null) { $info = curl_getinfo($curl); if ($curl_response === false || $info['http_code'] != 200) { - syslog(LOG_ERR, 'error occured during curl exec. Additioanl info: ' . var_export($info)); + syslog(LOG_ERR, 'error occured during curl exec. Additioanl info: ' . print_r($info, TRUE)); return 0; } |