projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
gh: fix issue #12;
[m6w6/ext-http]
/
php_http_message.c
diff --git
a/php_http_message.c
b/php_http_message.c
index 3b19a8c8f2dc1ba94fe6812542ac04df4b4f4429..c6b03ffe597b773ec93dea1b6c5f5f81ce473f8a 100644
(file)
--- a/
php_http_message.c
+++ b/
php_http_message.c
@@
-1619,10
+1619,10
@@
static PHP_METHOD(HttpMessage, setRequestUrl)
url = php_http_url_from_zval(zurl, ~0 TSRMLS_CC);
zend_restore_error_handling(&zeh TSRMLS_CC);
url = php_http_url_from_zval(zurl, ~0 TSRMLS_CC);
zend_restore_error_handling(&zeh TSRMLS_CC);
- if (php_http_url_is_empty(url)) {
+ if (
url &&
php_http_url_is_empty(url)) {
php_http_url_free(&url);
php_http_throw(invalid_arg, "Cannot set http\\Message's request url to an empty string", NULL);
php_http_url_free(&url);
php_http_throw(invalid_arg, "Cannot set http\\Message's request url to an empty string", NULL);
- } else {
+ } else
if (url)
{
PTR_SET(obj->message->http.info.request.url, url);
}
PTR_SET(obj->message->http.info.request.url, url);
}