@@ -699,6 +699,9 @@ PHP_METHOD(yaf_config_ini, get) {
699699	} else  {
700700		zval  * properties ;
701701		char  * entry , * seg , * pptr ;
702+ 		int  seg_len ;
703+ 	   	long  lval ;
704+ 		double  dval ;
702705
703706		properties  =  zend_read_property (yaf_config_ini_ce , getThis (), ZEND_STRL (YAF_CONFIG_PROPERT_NAME ), 1  TSRMLS_CC );
704707
@@ -709,19 +712,32 @@ PHP_METHOD(yaf_config_ini, get) {
709712		entry  =  estrndup (name , len );
710713		if  ((seg  =  php_strtok_r (entry , "." , & pptr ))) {
711714			while  (seg ) {
712- 				if  (zend_hash_find (Z_ARRVAL_P (properties ), seg , strlen (seg ) +  1 , (void  * * ) & ppzval ) ==  FAILURE ) {
713- 					efree (entry );
714- 					RETURN_NULL ();
715+ 				seg_len  =  strlen (seg );
716+ 				if  (is_numeric_string (seg , seg_len , & lval , & dval , 0 ) !=  IS_LONG ) {
717+ 					if  (zend_hash_find (Z_ARRVAL_P (properties ), seg , seg_len  +  1 , (void  * * ) & ppzval ) ==  FAILURE ) {
718+ 						efree (entry );
719+ 						RETURN_NULL ();
720+ 					}
721+ 				} else  {
722+ 					if  (zend_hash_index_find (Z_ARRVAL_P (properties ), lval , (void  * * ) & ppzval ) ==  FAILURE ) {
723+ 						efree (entry );
724+ 						RETURN_NULL ();
725+ 					}
715726				}
716727
717728				properties  =  * ppzval ;
718729				seg  =  php_strtok_r (NULL , "." , & pptr );
719730			}
720- 		} else  {
731+ 		} else  if  ( is_numeric_string ( name ,  len ,  & lval ,  & dval ,  0 )  !=   IS_LONG )  {
721732			if  (zend_hash_find (Z_ARRVAL_P (properties ), name , len  +  1 , (void  * * )& ppzval ) ==  FAILURE ) {
722733				efree (entry );
723734				RETURN_NULL ();
724735			}
736+ 		} else  {
737+ 			if  (zend_hash_index_find (Z_ARRVAL_P (properties ), lval , (void  * * ) & ppzval ) ==  FAILURE ) {
738+ 				efree (entry );
739+ 				RETURN_NULL ();
740+ 			}
725741		}
726742
727743		efree (entry );
0 commit comments