@@ -807,7 +807,7 @@ static int append_key_value(smart_str* loc_name, HashTable* hash_arr, char* key_
807807{
808808 zval * ele_value ;
809809
810- if ((ele_value = zend_hash_str_find (hash_arr , key_name , strlen (key_name ))) != NULL ) {
810+ if ((ele_value = zend_hash_str_find_deref (hash_arr , key_name , strlen (key_name ))) != NULL ) {
811811 if (Z_TYPE_P (ele_value )!= IS_STRING ){
812812 /* element value is not a string */
813813 return FAILURE ;
@@ -850,7 +850,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr,
850850 int isFirstSubtag = 0 ;
851851
852852 /* Variant/ Extlang/Private etc. */
853- if ((ele_value = zend_hash_str_find ( hash_arr , key_name , strlen (key_name ))) != NULL ) {
853+ if ((ele_value = zend_hash_str_find_deref ( hash_arr , key_name , strlen (key_name ))) != NULL ) {
854854 if ( Z_TYPE_P (ele_value ) == IS_STRING ){
855855 add_prefix ( loc_name , key_name );
856856
@@ -862,6 +862,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr,
862862 zval * data ;
863863
864864 ZEND_HASH_FOREACH_VAL (arr , data ) {
865+ ZVAL_DEREF (data );
865866 if (Z_TYPE_P (data ) != IS_STRING ) {
866867 return FAILURE ;
867868 }
@@ -893,7 +894,7 @@ static int append_multiple_key_values(smart_str* loc_name, HashTable* hash_arr,
893894 isFirstSubtag = 0 ;
894895 for ( i = 0 ; i < max_value ; i ++ ){
895896 snprintf ( cur_key_name , 30 , "%s%d" , key_name , i );
896- if ((ele_value = zend_hash_str_find ( hash_arr , cur_key_name , strlen (cur_key_name ))) != NULL ) {
897+ if ((ele_value = zend_hash_str_find_deref ( hash_arr , cur_key_name , strlen (cur_key_name ))) != NULL ) {
897898 if ( Z_TYPE_P (ele_value )!= IS_STRING ){
898899 /* variant is not a string */
899900 return FAILURE ;
@@ -1426,6 +1427,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
14261427
14271428 char * * cur_arr = ecalloc (zend_hash_num_elements (hash_arr )* 2 , sizeof (char * ));
14281429 ZEND_HASH_FOREACH_VAL (hash_arr , ele_value ) {
1430+ ZVAL_DEREF (ele_value );
14291431 /* convert the array to lowercase , also replace hyphens with the underscore and store it in cur_arr */
14301432 if (Z_TYPE_P (ele_value )!= IS_STRING ) {
14311433 /* element value is not a string */
0 commit comments