From: Veres Lajos Date: Mon, 8 Jul 2013 21:09:06 +0000 (+0100) Subject: HASH_KEY_NON_EXISTANT fix X-Git-Tag: php-5.5.2RC1~13^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4749457a498828e9f7919401889a991b8a9b94b5;p=php HASH_KEY_NON_EXISTANT fix --- diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index 20896abf3e..96c3f3d7b5 100644 --- a/Zend/zend_hash.c +++ b/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; } diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index a0c147f397..e6306bff02 100644 --- a/Zend/zend_hash.h +++ b/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); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index edb52bc4e4..47afabe48b 100644 --- a/Zend/zend_vm_def.h +++ b/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; diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index f7d73017cd..8ab23adf9b 100644 --- a/Zend/zend_vm_execute.h +++ b/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; diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 556f356b97..e153d35804 100644 --- a/ext/com_dotnet/com_variant.c +++ b/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) { diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c index 597b059951..355779e4ad 100644 --- a/ext/com_dotnet/com_wrapper.c +++ b/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) { diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 9cede14125..117221484e 100644 --- a/ext/hash/hash.c +++ b/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); } diff --git a/ext/intl/collator/collator_convert.c b/ext/intl/collator/collator_convert.c index e989d4c65a..2a3ac10fbf 100644 --- a/ext/intl/collator/collator_convert.c +++ b/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( diff --git a/ext/json/json.c b/ext/json/json.c index 53608412f5..782375e371 100644 --- a/ext/json/json.c +++ b/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) { diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index abe6b64aca..b66f4722e8 100644 --- a/ext/pcntl/pcntl.c +++ b/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; } diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 128c2894f8..3a17b8c357 100644 --- a/ext/pgsql/pgsql.c +++ b/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; diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 277d058ea6..c29ca9d968 100644 --- a/ext/phar/dirstream.c +++ b/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); diff --git a/ext/phar/phar.c b/ext/phar/phar.c index c5042cc34a..638c1ef83a 100644 --- a/ext/phar/phar.c +++ b/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; } diff --git a/ext/phar/stream.c b/ext/phar/stream.c index 924138d8fa..401d81e109 100644 --- a/ext/phar/stream.c +++ b/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)) { diff --git a/ext/phar/util.c b/ext/phar/util.c index 898d8bd4b2..8348a47874 100644 --- a/ext/phar/util.c +++ b/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; } diff --git a/ext/session/php_session.h b/ext/session/php_session.h index 1dd5b1a1a6..b28c2b4c28 100644 --- a/ext/session/php_session.h +++ b/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); \ diff --git a/ext/standard/array.c b/ext/standard/array.c index 99dbb538ea..22873862f7 100644 --- a/ext/standard/array.c +++ b/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); diff --git a/ext/standard/http.c b/ext/standard/http.c index 547df52186..f9b8021950 100644 --- a/ext/standard/http.c +++ b/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') { diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 4e39a40be4..d78ca9976b 100644 --- a/ext/standard/proc_open.c +++ b/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; } } diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index f487763b9e..0610ecfc49 100644 --- a/ext/standard/streamsfuncs.c +++ b/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 */ } diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index b44be124a1..1e5c38a373 100644 --- a/ext/standard/user_filters.c +++ b/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); diff --git a/ext/standard/var.c b/ext/standard/var.c index f76a14cfa6..cd868bb50f 100644 --- a/ext/standard/var.c +++ b/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) { diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index 925b554a56..b73cbcfe24 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/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: diff --git a/sapi/fpm/fpm/fastcgi.c b/sapi/fpm/fpm/fastcgi.c index cf3f098c53..99905c8b60 100644 --- a/sapi/fpm/fpm/fastcgi.c +++ b/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) {