- const char *key = list, *val = NULL;
- int vallen = 0, keylen = 0, done = 0;
- zval array;
-
- Z_ARRVAL(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 = estrdup(str); \
- decoded_len = 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);
- goto list_done;
- }
- /* additional info appended */
- else {
- HTTP_KEYLIST_FIXVAL();
- HTTP_KEYLIST_VAL(&array, "value", val, vallen);
+ zval **args, **trace_0, *old_trace_0, *trace = NULL, *sub_exception, *tmp_exception;
+
+ if (!new_exception) {
+ MAKE_STD_ZVAL(tmp_exception);
+ object_init_ex(tmp_exception, ce);
+ zend_update_property_string(ZEND_EXCEPTION_GET_DEFAULT(), tmp_exception, "message", lenof("message"), "Exception caused by inner exception(s)" TSRMLS_CC);
+ new_exception = tmp_exception;
+ } else {
+ sub_exception = new_exception;
+ tmp_exception = new_exception;
+ while ((tmp_exception = zend_read_property(Z_OBJCE_P(tmp_exception), tmp_exception, "innerException", lenof("innerException"), 0 TSRMLS_CC)) && Z_TYPE_P(tmp_exception) == IS_OBJECT) {
+ sub_exception = tmp_exception;