projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
update travis/pecl
[m6w6/ext-http]
/
src
/
php_http_url.c
diff --git
a/src/php_http_url.c
b/src/php_http_url.c
index 1a5f6aebe3e4b6ddc06a8784c793b4e9a9388419..2332fb55b8382572312dc9382c091bc4c15b67c2 100644
(file)
--- a/
src/php_http_url.c
+++ b/
src/php_http_url.c
@@
-503,7
+503,7
@@
php_http_url_t *php_http_url_from_struct(HashTable *ht)
HashTable *php_http_url_to_struct(const php_http_url_t *url, zval *strct)
{
HashTable *php_http_url_to_struct(const php_http_url_t *url, zval *strct)
{
- HashTable *ht;
+ HashTable *ht
= NULL
;
zval tmp;
if (strct) {
zval tmp;
if (strct) {
@@
-523,8
+523,8
@@
HashTable *php_http_url_to_struct(const php_http_url_t *url, zval *strct)
}
#define url_struct_add(part) \
}
#define url_struct_add(part) \
- if (Z_TYPE_P(strct) == IS_ARRAY) { \
- zend_hash_str_update(
Z_ARRVAL_P(strct)
, part, lenof(part), &tmp); \
+ if (
!strct ||
Z_TYPE_P(strct) == IS_ARRAY) { \
+ zend_hash_str_update(
ht
, part, lenof(part), &tmp); \
} else { \
zend_update_property(Z_OBJCE_P(strct), strct, part, lenof(part), &tmp); \
zval_ptr_dtor(&tmp); \
} else { \
zend_update_property(Z_OBJCE_P(strct), strct, part, lenof(part), &tmp); \
zval_ptr_dtor(&tmp); \
@@
-1078,7
+1078,7
@@
static const char *parse_ip6(struct parse_state *state, const char *ptr)
}
efree(addr);
} else {
}
efree(addr);
} else {
- pos =
tmp ? tmp - ptr :
end - ptr;
+ pos = end - ptr;
error = "expected ']'";
}
error = "expected ']'";
}