Skip to content

Commit 7a31692

Browse files
committed
Merge branch 'PHP-5.5'
2 parents f6260b3 + be07f81 commit 7a31692

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

Zend/zend_compile.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -4221,9 +4221,8 @@ static void zend_do_traits_property_binding(zend_class_entry *ce TSRMLS_DC) /* {
42214221
prop_name_length = property_info->name_length;
42224222
} else {
42234223
/* for private and protected we need to unmangle the names */
4224-
zend_unmangle_property_name(property_info->name, property_info->name_length,
4225-
&class_name_unused, &prop_name);
4226-
prop_name_length = strlen(prop_name);
4224+
zend_unmangle_property_name_ex(property_info->name, property_info->name_length,
4225+
&class_name_unused, &prop_name, &prop_name_length);
42274226
prop_hash = zend_get_hash_value(prop_name, prop_name_length + 1);
42284227
}
42294228

Zend/zend_object_handlers.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,10 @@ ZEND_API int zend_check_property_access(zend_object *zobj, const char *prop_info
363363
zend_property_info *property_info;
364364
const char *class_name, *prop_name;
365365
zval member;
366+
int prop_name_len;
366367

367-
zend_unmangle_property_name(prop_info_name, prop_info_name_len, &class_name, &prop_name);
368-
ZVAL_STRING(&member, prop_name, 0);
368+
zend_unmangle_property_name_ex(prop_info_name, prop_info_name_len, &class_name, &prop_name, &prop_name_len);
369+
ZVAL_STRINGL(&member, prop_name, prop_name_len, 0);
369370
property_info = zend_get_property_info_quick(zobj->ce, &member, 1, NULL TSRMLS_CC);
370371
if (!property_info) {
371372
return FAILURE;

ext/standard/http.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,11 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
6969
const char *tmp;
7070

7171
zend_object *zobj = zend_objects_get_address(type TSRMLS_CC);
72-
if (zend_check_property_access(zobj, key, key_len-1 TSRMLS_CC) != SUCCESS) {
72+
if (zend_check_property_access(zobj, key, key_len TSRMLS_CC) != SUCCESS) {
7373
/* private or protected property access outside of the class */
7474
continue;
7575
}
76-
zend_unmangle_property_name(key, key_len-1, &tmp, (const char**)&key);
77-
key_len = strlen(key);
76+
zend_unmangle_property_name_ex(key, key_len, &tmp, (const char**)&key, &key_len);
7877
}
7978

8079
if (zend_hash_get_current_data_ex(ht, (void **)&zdata, NULL) == FAILURE || !zdata || !(*zdata)) {

0 commit comments

Comments
 (0)