- ZVAL_NULL(&zjson);
- php_json_decode(&zjson, json->val, json->len, 1, PG(max_input_nesting_level));
- if (Z_TYPE(zjson) != IS_NULL) {
- zval_dtor(zarg);
- ZVAL_COPY_VALUE(zarg, (&zjson));
+ if (Z_TYPE(tmp) == IS_ARRAY) {
+ array_copy(Z_ARRVAL(tmp), Z_ARRVAL_P(zarg));