X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_object.c;h=7069e6aa50f3c058e1f3623938062ddd5eefafb7;hp=6e2fc27239550b4602526adc2882d0ca60b86e98;hb=f43d1c3e5b33a747150a521755cd97ef6e69db0c;hpb=5b8614c1c854c6683af7bf2dca4a6c970d4bfc25 diff --git a/http_message_object.c b/http_message_object.c index 6e2fc27..7069e6a 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -596,7 +596,7 @@ static HashTable *_http_message_object_get_props(zval *object TSRMLS_DC) getObjectEx(http_message_object, obj, object); http_message *msg = obj->message; HashTable *props = OBJ_PROP(obj); - zval array; + zval array, *parent; INIT_ZARR(array, props); @@ -651,6 +651,14 @@ static HashTable *_http_message_object_get_props(zval *object TSRMLS_DC) zend_hash_copy(Z_ARRVAL_P(headers), &msg->hdrs, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); ASSOC_PROP(array, zval, "headers", headers); ASSOC_STRINGL(array, "body", PHPSTR_VAL(msg), PHPSTR_LEN(msg)); + + MAKE_STD_ZVAL(parent); + if (msg->parent) { + ZVAL_OBJVAL(parent, obj->parent, 1); + } else { + ZVAL_NULL(parent); + } + ASSOC_PROP(array, zval, "parentMessage", parent); return OBJ_PROP(obj); }