From 335066864a37159713cda3bcd20ca222b409b002 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Wed, 31 Jul 2019 10:30:54 +0200 Subject: #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. --- admin/WebConsole/includes/restfunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-18-g5258