ext/mbstring: mb_ereg*_replace remove unreachable code. (#18646)

This commit is contained in:
David CARLIER 2025-05-25 10:44:59 +01:00 committed by GitHub
parent caf0a5352a
commit 16e154a2c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1106,12 +1106,6 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval)); smart_str_appendl(&out_buf, Z_STRVAL(retval), Z_STRLEN(retval));
smart_str_free(&eval_buf); smart_str_free(&eval_buf);
zval_ptr_dtor(&retval); zval_ptr_dtor(&retval);
} else {
if (!EG(exception)) {
zend_throw_error(NULL, "Unable to call custom replacement function");
zval_ptr_dtor(&subpats);
RETURN_THROWS();
}
} }
zval_ptr_dtor(&subpats); zval_ptr_dtor(&subpats);
} }