File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -561,6 +561,11 @@ static zval *php_filter_get_storage(zend_long arg)/* {{{ */
561
561
break ;
562
562
}
563
563
564
+ if (array_ptr && Z_TYPE_P (array_ptr ) != IS_ARRAY ) {
565
+ /* Storage not initialized */
566
+ return NULL ;
567
+ }
568
+
564
569
return array_ptr ;
565
570
}
566
571
/* }}} */
@@ -580,7 +585,7 @@ PHP_FUNCTION(filter_has_var)
580
585
581
586
array_ptr = php_filter_get_storage (arg );
582
587
583
- if (array_ptr && HASH_OF ( array_ptr ) && zend_hash_exists (HASH_OF (array_ptr ), var )) {
588
+ if (array_ptr && zend_hash_exists (Z_ARRVAL_P (array_ptr ), var )) {
584
589
RETURN_TRUE ;
585
590
}
586
591
@@ -733,7 +738,7 @@ PHP_FUNCTION(filter_input)
733
738
734
739
input = php_filter_get_storage (fetch_from );
735
740
736
- if (!input || ! HASH_OF ( input ) || ( tmp = zend_hash_find (HASH_OF (input ), var )) == NULL ) {
741
+ if (!input || ( tmp = zend_hash_find (Z_ARRVAL_P (input ), var )) == NULL ) {
737
742
zend_long filter_flags = 0 ;
738
743
zval * option , * opt , * def ;
739
744
if (filter_args ) {
@@ -810,7 +815,7 @@ PHP_FUNCTION(filter_input_array)
810
815
811
816
array_input = php_filter_get_storage (fetch_from );
812
817
813
- if (!array_input || ! HASH_OF ( array_input ) ) {
818
+ if (!array_input ) {
814
819
zend_long filter_flags = 0 ;
815
820
zval * option ;
816
821
if (op ) {
You can’t perform that action at this time.
0 commit comments