diff options
author | Aaron Piotrowski <aaron@trowski.com> | 2016-07-03 22:42:10 -0500 |
---|---|---|
committer | Aaron Piotrowski <aaron@trowski.com> | 2016-07-03 22:42:10 -0500 |
commit | d9a9cf8ecaef891b2369969e9efe9f6261359158 (patch) | |
tree | 04bcc83b3c9be1924007e007e1f508f7229af7ab /Zend/zend_API.c | |
parent | 583386d59e6b362fe49e51594718a109d0c0cc2f (diff) | |
parent | c2b29a58bc0916e248ba2584564558097b16b51f (diff) | |
download | php-git-d9a9cf8ecaef891b2369969e9efe9f6261359158.tar.gz |
Merge branch 'master' into iterable
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index d6350502ff..096b494e30 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -498,6 +498,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons const char *spec_walk = *spec; char c = *spec_walk++; int check_null = 0; + int separate = 0; zval *real_arg = arg; /* scan through modifiers */ @@ -506,6 +507,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons if (*spec_walk == '/') { SEPARATE_ZVAL_NOREF(arg); real_arg = arg; + separate = 1; } else if (*spec_walk == '!') { check_null = 1; } else { @@ -625,7 +627,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons { HashTable **p = va_arg(*va, HashTable **); - if (!zend_parse_arg_array_ht(arg, p, check_null, c == 'H')) { + if (!zend_parse_arg_array_ht(arg, p, check_null, c == 'H', separate)) { return "array"; } } @@ -2893,7 +2895,7 @@ static int zend_is_callable_check_class(zend_string *name, zend_class_entry *sco *strict_class = 1; ret = 1; } else { - if (error) zend_spprintf(error, 0, "class '%.*s' not found", name_len, ZSTR_VAL(name)); + if (error) zend_spprintf(error, 0, "class '%.*s' not found", (int)name_len, ZSTR_VAL(name)); } ZSTR_ALLOCA_FREE(lcname, use_heap); return ret; @@ -3847,7 +3849,7 @@ ZEND_API void zend_update_property_ex(zend_class_entry *scope, zval *object, zen EG(fake_scope) = scope; if (!Z_OBJ_HT_P(object)->write_property) { - zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be updated", name, ZSTR_VAL(Z_OBJCE_P(object)->name)); + zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be updated", ZSTR_VAL(name), ZSTR_VAL(Z_OBJCE_P(object)->name)); } ZVAL_STR(&property, name); Z_OBJ_HT_P(object)->write_property(object, &property, value, NULL); @@ -4042,7 +4044,7 @@ ZEND_API zval *zend_read_property_ex(zend_class_entry *scope, zval *object, zend EG(fake_scope) = scope; if (!Z_OBJ_HT_P(object)->read_property) { - zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be read", name, ZSTR_VAL(Z_OBJCE_P(object)->name)); + zend_error_noreturn(E_CORE_ERROR, "Property %s of class %s cannot be read", ZSTR_VAL(name), ZSTR_VAL(Z_OBJCE_P(object)->name)); } ZVAL_STR(&property, name); |