File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -545,6 +545,24 @@ static inline int ct_eval_func_call(
545
545
}
546
546
ZVAL_STR (result , str );
547
547
return SUCCESS ;
548
+ } else if (zend_string_equals_literal (name , "ini_get" )) {
549
+ zend_ini_entry * ini_entry ;
550
+
551
+ if (num_args != 1 || Z_TYPE_P (args [0 ]) != IS_STRING ) {
552
+ return FAILURE ;
553
+ }
554
+
555
+ ini_entry = zend_hash_find_ptr (EG (ini_directives ), Z_STR_P (args [0 ]));
556
+ if (!ini_entry ) {
557
+ ZVAL_FALSE (result );
558
+ } else if (ini_entry -> modifiable != ZEND_INI_SYSTEM ) {
559
+ return FAILURE ;
560
+ } else if (ini_entry -> value ) {
561
+ ZVAL_STR_COPY (result , ini_entry -> value );
562
+ } else {
563
+ ZVAL_EMPTY_STRING (result );
564
+ }
565
+ return SUCCESS ;
548
566
} else {
549
567
uint32_t i ;
550
568
zend_execute_data * execute_data ;
@@ -580,9 +598,6 @@ static inline int ct_eval_func_call(
580
598
|| (num_args == 2 && Z_TYPE_P (args [0 ]) == IS_ARRAY && Z_TYPE_P (args [1 ]) == IS_STRING ))) {
581
599
/* pass */
582
600
} else {
583
- #if 0
584
- fprintf (stderr , "constant ICALL to %s()\n" , ZSTR_VAL (name ));
585
- #endif
586
601
return FAILURE ;
587
602
}
588
603
You can’t perform that action at this time.
0 commit comments