File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -755,23 +755,22 @@ ZEND_FUNCTION(each)
755
755
Return the current error_reporting level, and if an argument was passed - change to the new level */
756
756
ZEND_FUNCTION (error_reporting )
757
757
{
758
- zval * err = NULL ;
758
+ zend_long err ;
759
759
int old_error_reporting ;
760
760
761
761
#ifndef FAST_ZPP
762
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "|z " , & err ) == FAILURE ) {
762
+ if (zend_parse_parameters (ZEND_NUM_ARGS (), "|l " , & err ) == FAILURE ) {
763
763
return ;
764
764
}
765
765
#else
766
766
ZEND_PARSE_PARAMETERS_START (0 , 1 )
767
767
Z_PARAM_OPTIONAL
768
- Z_PARAM_ZVAL (err )
768
+ Z_PARAM_LONG (err )
769
769
ZEND_PARSE_PARAMETERS_END ();
770
770
#endif
771
771
772
772
old_error_reporting = EG (error_reporting );
773
773
if (ZEND_NUM_ARGS () != 0 ) {
774
- zend_string * new_val = zval_get_string (err );
775
774
do {
776
775
zend_ini_entry * p = EG (error_reporting_ini_entry );
777
776
@@ -797,12 +796,8 @@ ZEND_FUNCTION(error_reporting)
797
796
zend_string_release (p -> value );
798
797
}
799
798
800
- p -> value = new_val ;
801
- if (Z_TYPE_P (err ) == IS_LONG ) {
802
- EG (error_reporting ) = Z_LVAL_P (err );
803
- } else {
804
- EG (error_reporting ) = atoi (ZSTR_VAL (p -> value ));
805
- }
799
+ p -> value = zend_long_to_str (err );
800
+ EG (error_reporting ) = err ;
806
801
} while (0 );
807
802
}
808
803
You can’t perform that action at this time.
0 commit comments