File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1487,13 +1487,14 @@ ZEND_API ZEND_COLD void zend_error_zstr_at(
14871487 info -> lineno = error_lineno ;
14881488 info -> filename = zend_string_copy (error_filename );
14891489 info -> message = zend_string_copy (message );
1490- EG (errors ).size ++ ;
1491- if (EG ( errors ). size > EG (errors ).capacity ) {
1490+ uint32_t new_size = EG (errors ).size + 1 ;
1491+ if (new_size > EG (errors ).capacity ) {
14921492 uint32_t capacity = EG (errors ).capacity ? EG (errors ).capacity + (EG (errors ).capacity >> 1 ) : 2 ;
14931493 EG (errors ).errors = erealloc (EG (errors ).errors , sizeof (zend_error_info * ) * capacity );
14941494 EG (errors ).capacity = capacity ;
14951495 }
1496- EG (errors ).errors [EG (errors ).size - 1 ] = info ;
1496+ EG (errors ).errors [EG (errors ).size ] = info ;
1497+ EG (errors ).size = new_size ;
14971498
14981499 /* Do not process non-fatal recorded error */
14991500 if (!(type & E_FATAL_ERRORS ) || (type & E_DONT_BAIL )) {
You can’t perform that action at this time.
0 commit comments