projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- rather show the exception than a useless "Cannot call HttpRequest::onfinish()"
[m6w6/ext-http]
/
http_request_object.c
diff --git
a/http_request_object.c
b/http_request_object.c
index bc7a0f854e1107fd361fd67fd7f501ca8bd14aa3..11a623030077bb658649f77f262f203bc07702a1 100644
(file)
--- a/
http_request_object.c
+++ b/
http_request_object.c
@@
-633,7
+633,7
@@
STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this
}
UPD_PROP(long, responseCode, msg->http.info.response.code);
}
UPD_PROP(long, responseCode, msg->http.info.response.code);
- UPD_PROP(string, responseStatus, msg->http.info.response.status);
+ UPD_PROP(string, responseStatus, msg->http.info.response.status
? msg->http.info.response.status : ""
);
MAKE_STD_ZVAL(resp);
array_init(resp);
MAKE_STD_ZVAL(resp);
array_init(resp);
@@
-688,7
+688,7
@@
STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this
ret = FAILURE;
}
ret = FAILURE;
}
- if (zend_hash_exists(&Z_OBJCE_P(getThis())->function_table, "onfinish", sizeof("onfinish"))) {
+ if (
!EG(exception) &&
zend_hash_exists(&Z_OBJCE_P(getThis())->function_table, "onfinish", sizeof("onfinish"))) {
zval *param;
MAKE_STD_ZVAL(param);
zval *param;
MAKE_STD_ZVAL(param);