summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes/restfunctions.php
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-07-31 10:30:54 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-07-31 11:40:25 +0200
commit4d7e35cc3ba7906e1477b7de423d52a224c37964 (patch)
tree261103fc1c57a4a949858c3756b024bc4b28c87c /admin/WebConsole/includes/restfunctions.php
parent47580ddb30adae1d0f454e1622fbd2ef56d9ace9 (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.
Diffstat (limited to 'admin/WebConsole/includes/restfunctions.php')
-rw-r--r--admin/WebConsole/includes/restfunctions.php2
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;
}