@@ -578,49 +578,46 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
578
578
}
579
579
580
580
switch (Z_TYPE_P (offset )) {
581
- case IS_STRING :
582
- if (check_empty ) {
583
- if (zend_symtable_find (spl_array_get_hash_table (intern , 0 TSRMLS_CC ), Z_STRVAL_P (offset ), Z_STRLEN_P (offset )+ 1 , (void * * ) & tmp ) != FAILURE ) {
584
- switch (check_empty ) {
585
- case 0 :
586
- return Z_TYPE_PP (tmp ) != IS_NULL ;
587
- case 2 :
588
- return 1 ;
589
- default :
590
- return zend_is_true (* tmp );
581
+ case IS_STRING :
582
+ {
583
+ HashTable * ht = spl_array_get_hash_table (intern , 0 TSRMLS_CC );
584
+ if (zend_symtable_find (ht , Z_STRVAL_P (offset ), Z_STRLEN_P (offset )+ 1 , (void * * ) & tmp ) != FAILURE ) {
585
+ switch (check_empty ) {
586
+ case 0 :
587
+ return Z_TYPE_PP (tmp ) != IS_NULL ;
588
+ case 2 :
589
+ return 1 ;
590
+ default :
591
+ return zend_is_true (* tmp );
592
+ }
591
593
}
594
+ return 0 ;
592
595
}
593
- return 0 ;
594
- } else {
595
- return zend_symtable_exists (spl_array_get_hash_table (intern , 0 TSRMLS_CC ), Z_STRVAL_P (offset ), Z_STRLEN_P (offset )+ 1 );
596
- }
597
- case IS_DOUBLE :
598
- case IS_RESOURCE :
599
- case IS_BOOL :
600
- case IS_LONG :
601
- if (offset -> type == IS_DOUBLE ) {
602
- index = (long )Z_DVAL_P (offset );
603
- } else {
604
- index = Z_LVAL_P (offset );
605
- }
606
- if (check_empty ) {
607
- HashTable * ht = spl_array_get_hash_table (intern , 0 TSRMLS_CC );
608
- if (zend_hash_index_find (ht , index , (void * * )& tmp ) != FAILURE ) {
609
- switch (check_empty ) {
610
- case 0 :
611
- return Z_TYPE_PP (tmp ) != IS_NULL ;
612
- case 2 :
613
- return 1 ;
614
- default :
615
- return zend_is_true (* tmp );
596
+ case IS_DOUBLE :
597
+ case IS_RESOURCE :
598
+ case IS_BOOL :
599
+ case IS_LONG :
600
+ {
601
+ HashTable * ht = spl_array_get_hash_table (intern , 0 TSRMLS_CC );
602
+ if (offset -> type == IS_DOUBLE ) {
603
+ index = (long )Z_DVAL_P (offset );
604
+ } else {
605
+ index = Z_LVAL_P (offset );
606
+ }
607
+ if (zend_hash_index_find (ht , index , (void * * )& tmp ) != FAILURE ) {
608
+ switch (check_empty ) {
609
+ case 0 :
610
+ return Z_TYPE_PP (tmp ) != IS_NULL ;
611
+ case 2 :
612
+ return 1 ;
613
+ default :
614
+ return zend_is_true (* tmp );
615
+ }
616
616
}
617
+ return 0 ;
617
618
}
618
- return 0 ;
619
- } else {
620
- return zend_hash_index_exists (spl_array_get_hash_table (intern , 0 TSRMLS_CC ), index );
621
- }
622
- default :
623
- zend_error (E_WARNING , "Illegal offset type" );
619
+ default :
620
+ zend_error (E_WARNING , "Illegal offset type" );
624
621
}
625
622
return 0 ;
626
623
} /* }}} */
0 commit comments