From: Michael Wallner Date: Mon, 19 Sep 2005 16:10:18 +0000 (+0000) Subject: - changed the default value of $include_parent of HttpMessage::toString() to false, X-Git-Tag: RELEASE_0_14_0~16 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=687fcc79f03b9915884223259b4dc64196d7edf6;p=m6w6%2Fext-http - changed the default value of $include_parent of HttpMessage::toString() to false, which should be the more intuitive behaviour --- diff --git a/http_message_object.c b/http_message_object.c index cd64d31..88cec86 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -871,7 +871,7 @@ PHP_METHOD(HttpMessage, send) } /* }}} */ -/* {{{ proto string HttpMessage::toString([bool include_parent = true]) +/* {{{ proto string HttpMessage::toString([bool include_parent = false]) * * Get the string representation of the Message. */ @@ -880,7 +880,7 @@ PHP_METHOD(HttpMessage, toString) IF_RETVAL_USED { char *string; size_t length; - zend_bool include_parent = 1; + zend_bool include_parent = 0; getObject(http_message_object, obj); if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &include_parent)) { diff --git a/tests/HttpMessage_001.phpt b/tests/HttpMessage_001.phpt index 6d8171d..00e0e4b 100644 --- a/tests/HttpMessage_001.phpt +++ b/tests/HttpMessage_001.phpt @@ -23,8 +23,8 @@ $m = new HttpMessage( ); var_dump($m->getBody()); -var_dump($m->toString()); -var_dump(HttpMessage::fromString($m->toString())->toString()); +var_dump($m->toString(true)); +var_dump(HttpMessage::fromString($m->toString(true))->toString(true)); ?> --EXPECTF-- %sTEST