Browse Source

HASH_KEY_NON_EXISTANT fix

pull/384/merge
Veres Lajos 13 years ago
committed by Stanislav Malyshev
parent
commit
4749457a49
  1. 4
      Zend/zend_hash.c
  2. 4
      Zend/zend_hash.h
  3. 2
      Zend/zend_vm_def.h
  4. 8
      Zend/zend_vm_execute.h
  5. 2
      ext/com_dotnet/com_variant.c
  6. 6
      ext/com_dotnet/com_wrapper.c
  7. 4
      ext/hash/hash.c
  8. 4
      ext/intl/collator/collator_convert.c
  9. 4
      ext/json/json.c
  10. 2
      ext/pcntl/pcntl.c
  11. 6
      ext/pgsql/pgsql.c
  12. 10
      ext/phar/dirstream.c
  13. 4
      ext/phar/phar.c
  14. 8
      ext/phar/stream.c
  15. 2
      ext/phar/util.c
  16. 2
      ext/session/php_session.h
  17. 2
      ext/standard/array.c
  18. 2
      ext/standard/http.c
  19. 2
      ext/standard/proc_open.c
  20. 4
      ext/standard/streamsfuncs.c
  21. 2
      ext/standard/user_filters.c
  22. 4
      ext/standard/var.c
  23. 4
      ext/xmlrpc/xmlrpc-epi-php.c
  24. 2
      sapi/fpm/fpm/fastcgi.c

4
Zend/zend_hash.c

@ -1168,7 +1168,7 @@ ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index,
return HASH_KEY_IS_LONG;
}
}
return HASH_KEY_NON_EXISTANT;
return HASH_KEY_NON_EXISTENT;
}
ZEND_API void zend_hash_get_current_key_zval_ex(const HashTable *ht, zval *key, HashPosition *pos) {
@ -1205,7 +1205,7 @@ ZEND_API int zend_hash_get_current_key_type_ex(HashTable *ht, HashPosition *pos)
return HASH_KEY_IS_LONG;
}
}
return HASH_KEY_NON_EXISTANT;
return HASH_KEY_NON_EXISTENT;
}

4
Zend/zend_hash.h

@ -27,7 +27,7 @@
#define HASH_KEY_IS_STRING 1
#define HASH_KEY_IS_LONG 2
#define HASH_KEY_NON_EXISTANT 3
#define HASH_KEY_NON_EXISTENT 3
#define HASH_UPDATE (1<<0)
#define HASH_ADD (1<<1)
@ -172,7 +172,7 @@ ZEND_API ulong zend_hash_next_free_element(const HashTable *ht);
/* traversing */
#define zend_hash_has_more_elements_ex(ht, pos) \
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTANT ? FAILURE : SUCCESS)
(zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS)
ZEND_API int zend_hash_move_forward_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_move_backwards_ex(HashTable *ht, HashPosition *pos);
ZEND_API int zend_hash_get_current_key_ex(const HashTable *ht, char **str_index, uint *str_length, ulong *num_index, zend_bool duplicate, HashPosition *pos);

2
Zend/zend_vm_def.h

@ -4211,7 +4211,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
zend_uchar key_type;
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
if (key_type != HASH_KEY_NON_EXISTANT &&
if (key_type != HASH_KEY_NON_EXISTENT &&
(key_type == HASH_KEY_IS_LONG ||
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
break;

8
Zend/zend_vm_execute.h

@ -2880,7 +2880,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
zend_uchar key_type;
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
if (key_type != HASH_KEY_NON_EXISTANT &&
if (key_type != HASH_KEY_NON_EXISTENT &&
(key_type == HASH_KEY_IS_LONG ||
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
break;
@ -8206,7 +8206,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_uchar key_type;
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
if (key_type != HASH_KEY_NON_EXISTANT &&
if (key_type != HASH_KEY_NON_EXISTENT &&
(key_type == HASH_KEY_IS_LONG ||
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
break;
@ -13544,7 +13544,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
zend_uchar key_type;
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
if (key_type != HASH_KEY_NON_EXISTANT &&
if (key_type != HASH_KEY_NON_EXISTENT &&
(key_type == HASH_KEY_IS_LONG ||
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
break;
@ -31175,7 +31175,7 @@ static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
zend_uchar key_type;
key_type = zend_hash_get_current_key_ex(fe_ht, &str_key, &str_key_len, &int_key, 0, NULL);
if (key_type != HASH_KEY_NON_EXISTANT &&
if (key_type != HASH_KEY_NON_EXISTENT &&
(key_type == HASH_KEY_IS_LONG ||
zend_check_property_access(zobj, str_key, str_key_len-1 TSRMLS_CC) == SUCCESS)) {
break;

2
ext/com_dotnet/com_variant.c

@ -53,7 +53,7 @@ static void safe_array_from_zval(VARIANT *v, zval *z, int codepage TSRMLS_DC)
if (HASH_KEY_IS_STRING == keytype) {
goto bogus;
} else if (HASH_KEY_NON_EXISTANT == keytype) {
} else if (HASH_KEY_NON_EXISTENT == keytype) {
break;
}
if (intindex > max_index) {

6
ext/com_dotnet/com_wrapper.c

@ -467,7 +467,7 @@ static void generate_dispids(php_dispatchex *disp TSRMLS_DC)
/* properties */
if (Z_OBJPROP_P(disp->object)) {
zend_hash_internal_pointer_reset_ex(Z_OBJPROP_P(disp->object), &pos);
while (HASH_KEY_NON_EXISTANT != (keytype =
while (HASH_KEY_NON_EXISTENT != (keytype =
zend_hash_get_current_key_ex(Z_OBJPROP_P(disp->object), &name,
&namelen, &pid, 0, &pos))) {
char namebuf[32];
@ -498,7 +498,7 @@ static void generate_dispids(php_dispatchex *disp TSRMLS_DC)
/* functions */
if (Z_OBJCE_P(disp->object)) {
zend_hash_internal_pointer_reset_ex(&Z_OBJCE_P(disp->object)->function_table, &pos);
while (HASH_KEY_NON_EXISTANT != (keytype =
while (HASH_KEY_NON_EXISTENT != (keytype =
zend_hash_get_current_key_ex(&Z_OBJCE_P(disp->object)->function_table,
&name, &namelen, &pid, 0, &pos))) {
@ -598,7 +598,7 @@ PHP_COM_DOTNET_API IDispatch *php_com_wrapper_export_as_sink(zval *val, GUID *si
zend_hash_init(disp->name_to_dispid, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_internal_pointer_reset_ex(id_to_name, &pos);
while (HASH_KEY_NON_EXISTANT != (keytype =
while (HASH_KEY_NON_EXISTENT != (keytype =
zend_hash_get_current_key_ex(id_to_name, &name, &namelen, &pid, 0, &pos))) {
if (keytype == HASH_KEY_IS_LONG) {

4
ext/hash/hash.c

@ -597,7 +597,7 @@ PHP_FUNCTION(hash_algos)
array_init(return_value);
for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos);
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, &str_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT;
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, &str_len, &idx, 0, &pos)) != HASH_KEY_NON_EXISTENT;
zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) {
add_next_index_stringl(return_value, str, str_len-1, 1);
}
@ -1042,7 +1042,7 @@ PHP_MINFO_FUNCTION(hash)
long type;
for(zend_hash_internal_pointer_reset_ex(&php_hash_hashtable, &pos);
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, NULL, &idx, 0, &pos)) != HASH_KEY_NON_EXISTANT;
(type = zend_hash_get_current_key_ex(&php_hash_hashtable, &str, NULL, &idx, 0, &pos)) != HASH_KEY_NON_EXISTENT;
zend_hash_move_forward_ex(&php_hash_hashtable, &pos)) {
s += slprintf(s, e - s, "%s ", str);
}

4
ext/intl/collator/collator_convert.c

@ -139,7 +139,7 @@ void collator_convert_hash_from_utf8_to_utf16( HashTable* hash, UErrorCode* stat
zend_hash_internal_pointer_reset( hash );
while( ( hashKeyType = zend_hash_get_current_key( hash, &hashKey, &hashIndex, 0 ) )
!= HASH_KEY_NON_EXISTANT )
!= HASH_KEY_NON_EXISTENT )
{
/* Convert current hash item from UTF-8 to UTF-16LE. */
collator_convert_hash_item_from_utf8_to_utf16(
@ -164,7 +164,7 @@ void collator_convert_hash_from_utf16_to_utf8( HashTable* hash, UErrorCode* stat
zend_hash_internal_pointer_reset( hash );
while( ( hashKeyType = zend_hash_get_current_key( hash, &hashKey, &hashIndex, 0 ) )
!= HASH_KEY_NON_EXISTANT )
!= HASH_KEY_NON_EXISTENT )
{
/* Convert current hash item from UTF-16LE to UTF-8. */
collator_convert_hash_item_from_utf16_to_utf8(

4
ext/json/json.c

@ -185,7 +185,7 @@ static int json_determine_array_type(zval **val TSRMLS_DC) /* {{{ */
idx = 0;
for (;; zend_hash_move_forward_ex(myht, &pos)) {
i = zend_hash_get_current_key_ex(myht, &key, &key_len, &index, 0, &pos);
if (i == HASH_KEY_NON_EXISTANT) {
if (i == HASH_KEY_NON_EXISTENT) {
break;
}
@ -271,7 +271,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC)
zend_hash_internal_pointer_reset_ex(myht, &pos);
for (;; zend_hash_move_forward_ex(myht, &pos)) {
i = zend_hash_get_current_key_ex(myht, &key, &key_len, &index, 0, &pos);
if (i == HASH_KEY_NON_EXISTANT)
if (i == HASH_KEY_NON_EXISTENT)
break;
if (zend_hash_get_current_data_ex(myht, (void **) &data, &pos) == SUCCESS) {

2
ext/pcntl/pcntl.c

@ -795,7 +795,7 @@ PHP_FUNCTION(pcntl_exec)
snprintf(key, 100, "%ld", key_num);
key_length = strlen(key);
break;
case HASH_KEY_NON_EXISTANT:
case HASH_KEY_NON_EXISTENT:
pair--;
continue;
}

6
ext/pgsql/pgsql.c

@ -5338,7 +5338,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
skip_field = 0;
new_val = NULL;
if ((key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &field, &field_len, &num_idx, 0, &pos)) == HASH_KEY_NON_EXISTANT) {
if ((key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &field, &field_len, &num_idx, 0, &pos)) == HASH_KEY_NON_EXISTENT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to get array key type");
err = 1;
}
@ -5346,7 +5346,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Accepts only string key for values");
err = 1;
}
if (!err && key_type == HASH_KEY_NON_EXISTANT) {
if (!err && key_type == HASH_KEY_NON_EXISTENT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Accepts only string key for values");
err = 1;
}
@ -6049,7 +6049,7 @@ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(var_array), &pos);
while ((key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(var_array), &fld,
&fld_len, &num_idx, 0, &pos)) != HASH_KEY_NON_EXISTANT) {
&fld_len, &num_idx, 0, &pos)) != HASH_KEY_NON_EXISTENT) {
if (key_type == HASH_KEY_IS_LONG) {
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Expects associative array for values to be inserted");
goto cleanup;

10
ext/phar/dirstream.c

@ -103,7 +103,7 @@ static size_t phar_dir_read(php_stream *stream, char *buf, size_t count TSRMLS_D
return 0;
}
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(data, &key, &keylen, &unused, 0, NULL)) {
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(data, &key, &keylen, &unused, 0, NULL)) {
return 0;
}
@ -211,7 +211,7 @@ static php_stream *phar_make_dirstream(char *dir, HashTable *manifest TSRMLS_DC)
zend_hash_internal_pointer_reset(manifest);
while (FAILURE != zend_hash_has_more_elements(manifest)) {
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(manifest, &key, &keylen, &unused, 0, NULL)) {
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(manifest, &key, &keylen, &unused, 0, NULL)) {
break;
}
@ -403,7 +403,7 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, char *path, char
/* search for directory */
zend_hash_internal_pointer_reset(&phar->manifest);
while (FAILURE != zend_hash_has_more_elements(&phar->manifest)) {
if (HASH_KEY_NON_EXISTANT !=
if (HASH_KEY_NON_EXISTENT !=
zend_hash_get_current_key_ex(
&phar->manifest, &key, &keylen, &unused, 0, NULL)) {
PHAR_STR(key, str_key);
@ -637,7 +637,7 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, char *url, int options, php_
if (!entry->is_deleted) {
for (zend_hash_internal_pointer_reset(&phar->manifest);
HASH_KEY_NON_EXISTANT != zend_hash_get_current_key_ex(&phar->manifest, &key, &key_len, &unused, 0, NULL);
HASH_KEY_NON_EXISTENT != zend_hash_get_current_key_ex(&phar->manifest, &key, &key_len, &unused, 0, NULL);
zend_hash_move_forward(&phar->manifest)) {
PHAR_STR(key, str_key);
@ -658,7 +658,7 @@ int phar_wrapper_rmdir(php_stream_wrapper *wrapper, char *url, int options, php_
}
for (zend_hash_internal_pointer_reset(&phar->virtual_dirs);
HASH_KEY_NON_EXISTANT != zend_hash_get_current_key_ex(&phar->virtual_dirs, &key, &key_len, &unused, 0, NULL);
HASH_KEY_NON_EXISTENT != zend_hash_get_current_key_ex(&phar->virtual_dirs, &key, &key_len, &unused, 0, NULL);
zend_hash_move_forward(&phar->virtual_dirs)) {
PHAR_STR(key, str_key);

4
ext/phar/phar.c

@ -1964,7 +1964,7 @@ woohoo:
zend_hash_internal_pointer_reset(&(PHAR_GLOBALS->phar_fname_map));
while (FAILURE != zend_hash_has_more_elements(&(PHAR_GLOBALS->phar_fname_map))) {
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(&(PHAR_GLOBALS->phar_fname_map), &key, &keylen, &unused, 0, NULL)) {
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(&(PHAR_GLOBALS->phar_fname_map), &key, &keylen, &unused, 0, NULL)) {
break;
}
@ -1994,7 +1994,7 @@ woohoo:
zend_hash_internal_pointer_reset(&cached_phars);
while (FAILURE != zend_hash_has_more_elements(&cached_phars)) {
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(&cached_phars, &key, &keylen, &unused, 0, NULL)) {
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(&cached_phars, &key, &keylen, &unused, 0, NULL)) {
break;
}

8
ext/phar/stream.c

@ -635,7 +635,7 @@ static int phar_wrapper_stat(php_stream_wrapper *wrapper, char *url, int flags,
zend_hash_internal_pointer_reset_ex(&phar->mounted_dirs, &pos);
while (FAILURE != zend_hash_has_more_elements_ex(&phar->mounted_dirs, &pos)) {
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &keylen, &unused, 0, &pos)) {
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &keylen, &unused, 0, &pos)) {
break;
}
PHAR_STR(key, str_key);
@ -918,7 +918,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, char *url_from, char
uint to_len = strlen(resource_to->path+1);
for (zend_hash_internal_pointer_reset(&phar->manifest);
HASH_KEY_NON_EXISTANT != (key_type = zend_hash_get_current_key_ex(&phar->manifest, &key, &key_len, &unused, 0, NULL)) &&
HASH_KEY_NON_EXISTENT != (key_type = zend_hash_get_current_key_ex(&phar->manifest, &key, &key_len, &unused, 0, NULL)) &&
SUCCESS == zend_hash_get_current_data(&phar->manifest, (void **) &entry);
zend_hash_move_forward(&phar->manifest)) {
@ -952,7 +952,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, char *url_from, char
}
for (zend_hash_internal_pointer_reset(&phar->virtual_dirs);
HASH_KEY_NON_EXISTANT != (key_type = zend_hash_get_current_key_ex(&phar->virtual_dirs, &key, &key_len, &unused, 0, NULL));
HASH_KEY_NON_EXISTENT != (key_type = zend_hash_get_current_key_ex(&phar->virtual_dirs, &key, &key_len, &unused, 0, NULL));
zend_hash_move_forward(&phar->virtual_dirs)) {
PHAR_STR(key, str_key);
@ -979,7 +979,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, char *url_from, char
}
for (zend_hash_internal_pointer_reset(&phar->mounted_dirs);
HASH_KEY_NON_EXISTANT != (key_type = zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &key_len, &unused, 0, NULL)) &&
HASH_KEY_NON_EXISTENT != (key_type = zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &key_len, &unused, 0, NULL)) &&
SUCCESS == zend_hash_get_current_data(&phar->mounted_dirs, (void **) &entry);
zend_hash_move_forward(&phar->mounted_dirs)) {

2
ext/phar/util.c

@ -1554,7 +1554,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, in
zend_hash_internal_pointer_reset(&phar->mounted_dirs);
while (FAILURE != zend_hash_has_more_elements(&phar->mounted_dirs)) {
if (HASH_KEY_NON_EXISTANT == zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &keylen, &unused, 0, NULL)) {
if (HASH_KEY_NON_EXISTENT == zend_hash_get_current_key_ex(&phar->mounted_dirs, &key, &keylen, &unused, 0, NULL)) {
break;
}

2
ext/session/php_session.h

@ -254,7 +254,7 @@ PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC);
int key_type; \
\
for (zend_hash_internal_pointer_reset(_ht); \
(key_type = zend_hash_get_current_key_ex(_ht, &key, &key_length, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTANT; \
(key_type = zend_hash_get_current_key_ex(_ht, &key, &key_length, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT; \
zend_hash_move_forward(_ht)) { \
if (key_type == HASH_KEY_IS_LONG) { \
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Skipping numeric key %ld", num_key); \

2
ext/standard/array.c

@ -4017,7 +4017,7 @@ PHP_FUNCTION(array_rand)
/* We can't use zend_hash_index_find() because the array may have string keys or gaps. */
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(input), &pos);
while (num_req && (key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &string_key_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTANT) {
while (num_req && (key_type = zend_hash_get_current_key_ex(Z_ARRVAL_P(input), &string_key, &string_key_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTENT) {
randval = php_rand(TSRMLS_C);

2
ext/standard/http.c

@ -56,7 +56,7 @@ PHPAPI int php_url_encode_hash_ex(HashTable *ht, smart_str *formstr,
arg_sep_len = strlen(arg_sep);
for (zend_hash_internal_pointer_reset(ht);
(key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTANT;
(key_type = zend_hash_get_current_key_ex(ht, &key, &key_len, &idx, 0, NULL)) != HASH_KEY_NON_EXISTENT;
zend_hash_move_forward(ht)
) {
if (key_type == HASH_KEY_IS_STRING && key_len && key[key_len-1] == '\0') {

2
ext/standard/proc_open.c

@ -172,7 +172,7 @@ static php_process_env_t _php_array_to_envp(zval *environment, int is_persistent
#endif
p += el_len + 1;
break;
case HASH_KEY_NON_EXISTANT:
case HASH_KEY_NON_EXISTENT:
break;
}
}

4
ext/standard/streamsfuncs.c

@ -583,7 +583,7 @@ PHP_FUNCTION(stream_get_wrappers)
HashPosition pos;
array_init(return_value);
for (zend_hash_internal_pointer_reset_ex(url_stream_wrappers_hash, &pos);
(key_flags = zend_hash_get_current_key_ex(url_stream_wrappers_hash, &stream_protocol, &stream_protocol_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTANT;
(key_flags = zend_hash_get_current_key_ex(url_stream_wrappers_hash, &stream_protocol, &stream_protocol_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTENT;
zend_hash_move_forward_ex(url_stream_wrappers_hash, &pos)) {
if (key_flags == HASH_KEY_IS_STRING) {
add_next_index_stringl(return_value, stream_protocol, stream_protocol_len - 1, 1);
@ -668,7 +668,7 @@ static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC)
type = zend_hash_get_current_key_ex(Z_ARRVAL_P(stream_array),
&key, &key_len, &num_ind, 0, NULL);
if (type == HASH_KEY_NON_EXISTANT ||
if (type == HASH_KEY_NON_EXISTENT ||
zend_hash_get_current_data(Z_ARRVAL_P(stream_array), (void **) &elem) == FAILURE) {
continue; /* should not happen */
}

2
ext/standard/user_filters.c

@ -559,7 +559,7 @@ PHP_FUNCTION(stream_get_filters)
if (filters_hash) {
for(zend_hash_internal_pointer_reset(filters_hash);
(key_flags = zend_hash_get_current_key_ex(filters_hash, &filter_name, &filter_name_len, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTANT;
(key_flags = zend_hash_get_current_key_ex(filters_hash, &filter_name, &filter_name_len, &num_key, 0, NULL)) != HASH_KEY_NON_EXISTENT;
zend_hash_move_forward(filters_hash))
if (key_flags == HASH_KEY_IS_STRING) {
add_next_index_stringl(return_value, filter_name, filter_name_len - 1, 1);

4
ext/standard/var.c

@ -649,7 +649,7 @@ static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_pt
for (;; zend_hash_move_forward_ex(HASH_OF(retval_ptr), &pos)) {
i = zend_hash_get_current_key_ex(HASH_OF(retval_ptr), &key, NULL, &index, 0, &pos);
if (i == HASH_KEY_NON_EXISTANT) {
if (i == HASH_KEY_NON_EXISTENT) {
break;
}
@ -860,7 +860,7 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var
zend_hash_internal_pointer_reset_ex(myht, &pos);
for (;; zend_hash_move_forward_ex(myht, &pos)) {
i = zend_hash_get_current_key_ex(myht, &key, &key_len, &index, 0, &pos);
if (i == HASH_KEY_NON_EXISTANT) {
if (i == HASH_KEY_NON_EXISTENT) {
break;
}
if (incomplete_class && strcmp(key, MAGIC_MEMBER) == 0) {

4
ext/xmlrpc/xmlrpc-epi-php.c

@ -502,7 +502,7 @@ static XMLRPC_VECTOR_TYPE determine_vector_type (HashTable *ht)
}
bArray = 1;
last_num = num_index;
} else if (res == HASH_KEY_NON_EXISTANT) {
} else if (res == HASH_KEY_NON_EXISTENT) {
break;
} else if (res == HASH_KEY_IS_STRING) {
if (bArray) {
@ -582,7 +582,7 @@ static XMLRPC_VALUE PHP_to_XMLRPC_worker (const char* key, zval* in_val, int dep
int res = my_zend_hash_get_current_key(Z_ARRVAL_P(val_arr), &my_key, &num_index);
switch (res) {
case HASH_KEY_NON_EXISTANT:
case HASH_KEY_NON_EXISTENT:
break;
case HASH_KEY_IS_STRING:
case HASH_KEY_IS_LONG:

2
sapi/fpm/fpm/fastcgi.c

@ -610,7 +610,7 @@ static int fcgi_read_request(fcgi_request *req)
}
zend_hash_internal_pointer_reset_ex(req->env, &pos);
while ((key_type = zend_hash_get_current_key_ex(req->env, &str_index, &str_length, &num_index, 0, &pos)) != HASH_KEY_NON_EXISTANT) {
while ((key_type = zend_hash_get_current_key_ex(req->env, &str_index, &str_length, &num_index, 0, &pos)) != HASH_KEY_NON_EXISTENT) {
int zlen;
zend_hash_move_forward_ex(req->env, &pos);
if (key_type != HASH_KEY_IS_STRING) {

Loading…
Cancel
Save