From 8abf3ecc154681c81e5a9a312f2ae01af1ecabbf Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 3 Sep 2016 21:26:17 -0400 Subject: [PATCH] ApiExplorer - Fix formatting of getvalue return field --- templates/CRM/Admin/Page/APIExplorer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/CRM/Admin/Page/APIExplorer.js b/templates/CRM/Admin/Page/APIExplorer.js index 62f2fe5b2d..5ce9482aad 100644 --- a/templates/CRM/Admin/Page/APIExplorer.js +++ b/templates/CRM/Admin/Page/APIExplorer.js @@ -658,8 +658,8 @@ $.each(params, function(key, value) { var json = JSON.stringify(value), // Encourage 'return' to be an array - at least in php & js - js = key === 'return' ? JSON.stringify(evaluate(value, true)) : json, - php = key === 'return' ? phpFormat(evaluate(value, true)) : phpFormat(value); + js = key === 'return' && action !== 'getvalue' ? JSON.stringify(evaluate(value, true)) : json, + php = key === 'return' && action !== 'getvalue' ? phpFormat(evaluate(value, true)) : phpFormat(value); if (!(i++)) { q.php += ", array(\n"; q.json += ", {\n"; -- 2.25.1