[aur-dev] [PATCH] RPC: Use JSON_NUMERIC_CHECK when encoding json response
Johannes Löthberg
johannes at kyriasis.com
Fri Jul 3 21:50:31 UTC 2015
JSON_NUMERIC_CHECK has been available since PHP 5.3.3 to encode numeric
strings as numbers.
Fixes FS#45537.
Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
web/lib/aurjson.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index 7b77da4..a619ee5 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -147,7 +147,7 @@ class AurJSON {
$json_array['error'] = $error;
}
- return json_encode($json_array);
+ return json_encode($json_array, JSON_NUMERIC_CHECK);
}
private function get_extended_fields($pkgid) {
--
2.4.5
More information about the aur-dev
mailing list