summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/reflection/php_reflection.c3
-rw-r--r--ext/standard/array.c2
-rw-r--r--ext/standard/url.c4
3 files changed, 4 insertions, 5 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 20d3eb0e73..869a68d45c 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -575,14 +575,13 @@ static void _class_string(string *str, zend_class_entry *ce, zval *obj, char *in
zend_string *prop_name;
ulong index;
- if (zend_hash_get_current_key_ex(properties, &prop_name, &index, 1, &pos) == HASH_KEY_IS_STRING) {
+ if (zend_hash_get_current_key_ex(properties, &prop_name, &index, 0, &pos) == HASH_KEY_IS_STRING) {
if (prop_name->len && prop_name->val[0]) { /* skip all private and protected properties */
if (!zend_hash_exists(&ce->properties_info, prop_name)) {
count++;
_property_string(&dyn, NULL, prop_name->val, sub_indent.buf->val TSRMLS_CC);
}
}
- efree(prop_name);
}
zend_hash_move_forward_ex(properties, &pos);
}
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 5e5fa73cd7..864802ea53 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -2865,7 +2865,7 @@ PHP_FUNCTION(array_change_key_case)
zend_hash_index_update(Z_ARRVAL_P(return_value), num_key, entry);
break;
case HASH_KEY_IS_STRING:
- new_key = STR_DUP(string_key, 0);
+ new_key = STR_INIT(string_key->val, string_key->len, 0);
if (change_to_upper) {
php_strtoupper(new_key->val, new_key->len);
} else {
diff --git a/ext/standard/url.c b/ext/standard/url.c
index d280717d84..26587dc8f8 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -555,7 +555,7 @@ PHP_FUNCTION(urldecode)
return;
}
- out_str = STR_DUP(in_str, 0);
+ out_str = STR_INIT(in_str->val, in_str->len, 0);
out_str->len = php_url_decode(out_str->val, out_str->len);
RETURN_STR(out_str);
@@ -650,7 +650,7 @@ PHP_FUNCTION(rawurldecode)
return;
}
- out_str = STR_DUP(in_str, 0);
+ out_str = STR_INIT(in_str->val, in_str->len, 0);
out_str->len = php_raw_url_decode(out_str->val, out_str->len);
RETURN_STR(out_str);