projects
/
m6w6
/
ext-pq
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
prepare release 2.1.4
[m6w6/ext-pq]
/
src
/
php_pq_params.c
diff --git
a/src/php_pq_params.c
b/src/php_pq_params.c
index 0f7ba503adbc6b8df6d5b142d77e848f1ccd0179..6739b459b00876d445f65fe3981b3735435632bf 100644
(file)
--- a/
src/php_pq_params.c
+++ b/
src/php_pq_params.c
@@
-75,7
+75,9
@@
unsigned php_pq_params_add_type_oid(php_pq_params_t *p, Oid type)
static zend_string *object_param_to_string(php_pq_params_t *p, zval *zobj, Oid type)
{
static zend_string *object_param_to_string(php_pq_params_t *p, zval *zobj, Oid type)
{
+#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
smart_str str = {0};
smart_str str = {0};
+#endif
switch (type) {
#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
switch (type) {
#if PHP_PQ_HAVE_PHP_JSON_H && defined(PHP_PQ_OID_JSON)
@@
-83,6
+85,9
@@
static zend_string *object_param_to_string(php_pq_params_t *p, zval *zobj, Oid t
case PHP_PQ_OID_JSONB:
# endif
case PHP_PQ_OID_JSON:
case PHP_PQ_OID_JSONB:
# endif
case PHP_PQ_OID_JSON:
+# if PHP_VERSION_ID >= 70100
+ JSON_G(encode_max_depth) = PHP_JSON_PARSER_DEFAULT_DEPTH;
+# endif
php_json_encode(&str, zobj, PHP_JSON_UNESCAPED_UNICODE);
smart_str_0(&str);
return str.s;
php_json_encode(&str, zobj, PHP_JSON_UNESCAPED_UNICODE);
smart_str_0(&str);
return str.s;