File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -1046,16 +1046,17 @@ static inline int ct_eval_func_call(
10461046 for (i = 0 ; i < num_args ; i ++ ) {
10471047 zval_ptr_dtor_nogc (EX_VAR_NUM (i ));
10481048 }
1049- efree (execute_data );
1050- EG (current_execute_data ) = prev_execute_data ;
10511049
1050+ int retval = SUCCESS ;
10521051 if (EG (exception )) {
10531052 zval_ptr_dtor (result );
10541053 zend_clear_exception ();
1055- return FAILURE ;
1054+ retval = FAILURE ;
10561055 }
10571056
1058- return SUCCESS ;
1057+ efree (execute_data );
1058+ EG (current_execute_data ) = prev_execute_data ;
1059+ return retval ;
10591060}
10601061
10611062#define SET_RESULT (op , zv ) do { \
Original file line number Diff line number Diff line change 1+ <?php
2+ var_dump (version_compare ('1.2 ' , '2.1 ' , '?? ' ));
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Exception thrown during SCCP evaluation, separate file variation
3+ --FILE--
4+ <?php
5+ require __DIR__ . '/sccp_exception2.inc ' ;
6+ ?>
7+ --EXPECTF--
8+ Fatal error: Uncaught ValueError: version_compare(): Argument #3 ($operator) must be a valid comparison operator in %s:%d
9+ Stack trace:
10+ #0 %s(%d): version_compare('1.2', '2.1', '??')
11+ #1 %s(%d): require('/home/nikic/php...')
12+ #2 {main}
13+ thrown in %s on line %d
You can’t perform that action at this time.
0 commit comments