@@ -323,7 +323,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
323323 zval * tmpzval ;
324324
325325 if ((Z_TYPE_P (filterparams ) == IS_ARRAY || Z_TYPE_P (filterparams ) == IS_OBJECT ) &&
326- (tmpzval = zend_hash_str_find (HASH_OF (filterparams ), "window" , sizeof ("window" ) - 1 ))) {
326+ (tmpzval = zend_hash_str_find_ind (HASH_OF (filterparams ), "window" , sizeof ("window" ) - 1 ))) {
327327 /* log-2 base of history window (9 - 15) */
328328 zend_long tmp = zval_get_long (tmpzval );
329329 if (tmp < - MAX_WBITS || tmp > MAX_WBITS + 32 ) {
@@ -354,8 +354,10 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
354354
355355 switch (Z_TYPE_P (filterparams )) {
356356 case IS_ARRAY :
357- case IS_OBJECT :
358- if ((tmpzval = zend_hash_str_find (HASH_OF (filterparams ), "memory" , sizeof ("memory" ) - 1 ))) {
357+ case IS_OBJECT : {
358+ HashTable * ht = HASH_OF (filterparams );
359+
360+ if ((tmpzval = zend_hash_str_find_ind (ht , "memory" , sizeof ("memory" ) - 1 ))) {
359361 /* Memory Level (1 - 9) */
360362 tmp = zval_get_long (tmpzval );
361363 if (tmp < 1 || tmp > MAX_MEM_LEVEL ) {
@@ -365,7 +367,7 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
365367 }
366368 }
367369
368- if ((tmpzval = zend_hash_str_find ( HASH_OF ( filterparams ) , "window" , sizeof ("window" ) - 1 ))) {
370+ if ((tmpzval = zend_hash_str_find_ind ( ht , "window" , sizeof ("window" ) - 1 ))) {
369371 /* log-2 base of history window (9 - 15) */
370372 tmp = zval_get_long (tmpzval );
371373 if (tmp < - MAX_WBITS || tmp > MAX_WBITS + 16 ) {
@@ -375,13 +377,14 @@ static php_stream_filter *php_zlib_filter_create(const char *filtername, zval *f
375377 }
376378 }
377379
378- if ((tmpzval = zend_hash_str_find ( HASH_OF ( filterparams ) , "level" , sizeof ("level" ) - 1 ))) {
380+ if ((tmpzval = zend_hash_str_find_ind ( ht , "level" , sizeof ("level" ) - 1 ))) {
379381 tmp = zval_get_long (tmpzval );
380382
381383 /* Pseudo pass through to catch level validating code */
382384 goto factory_setlevel ;
383385 }
384386 break ;
387+ }
385388 case IS_STRING :
386389 case IS_DOUBLE :
387390 case IS_LONG :
0 commit comments