- const char *key = list, *val = NULL;
- int vallen = 0, keylen = 0, done = 0;
- zval array;
-
- INIT_ZARR(array, items);
-
- if (!(val = strchr(list, '='))) {
- return FAILURE;
- }
-
-#define HTTP_KEYLIST_VAL(array, k, str, len) \
- { \
- char *decoded; \
- size_t decoded_len; \
- if (decode) { \
- decode(str, len, &decoded, &decoded_len TSRMLS_CC); \
- } else { \
- decoded_len = len; \
- decoded = estrndup(str, decoded_len); \
- } \
- add_assoc_stringl(array, k, decoded, decoded_len, 0); \
- }
-#define HTTP_KEYLIST_FIXKEY() \
- { \
- while (isspace(*key)) ++key; \
- keylen = val - key; \
- while (isspace(key[keylen - 1])) --keylen; \
- }
-#define HTTP_KEYLIST_FIXVAL() \
- { \
- ++val; \
- while (isspace(*val)) ++val; \
- vallen = key - val; \
- while (isspace(val[vallen - 1])) --vallen; \
- }
-
- HTTP_KEYLIST_FIXKEY();
-
- if (first_entry_is_name_value_pair) {
- HTTP_KEYLIST_VAL(&array, "name", key, keylen);
-
- /* just one name=value */
- if (!(key = strchr(val, separator))) {
- key = val + strlen(val);
- HTTP_KEYLIST_FIXVAL();
- HTTP_KEYLIST_VAL(&array, "value", val, vallen);
- return SUCCESS;
- }
- /* additional info appended */
- else {
- HTTP_KEYLIST_FIXVAL();
- HTTP_KEYLIST_VAL(&array, "value", val, vallen);
+ zval **args, **trace_0, *old_trace_0, *trace = NULL;
+
+ if ((trace = zend_read_property(ZEND_EXCEPTION_GET_DEFAULT(), from, "trace", lenof("trace"), 0 TSRMLS_CC))) {
+ if (Z_TYPE_P(trace) == IS_ARRAY && SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
+ old_trace_0 = *trace_0;
+ if (Z_TYPE_PP(trace_0) == IS_ARRAY && SUCCESS == zend_hash_find(Z_ARRVAL_PP(trace_0), "args", sizeof("args"), (void *) &args)) {
+ if ((trace = zend_read_property(ZEND_EXCEPTION_GET_DEFAULT(), to, "trace", lenof("trace"), 0 TSRMLS_CC))) {
+ if (Z_TYPE_P(trace) == IS_ARRAY && SUCCESS == zend_hash_index_find(Z_ARRVAL_P(trace), 0, (void *) &trace_0)) {
+ ZVAL_ADDREF(*args);
+ add_assoc_zval(*trace_0, "args", *args);
+ }
+ }
+ }