1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/templates/base
Giteabot 2399b4d483
Avoid unnecessary 500 panic when a commit doesn't exist (#28719) (#28721)
Backport #28719 by wxiaoguang

In #26851, it assumed that `Commit` always exists when
`PageIsDiff==true`.

But for a 404 page, the `Commit` doesn't exist, so the following code
would cause panic because nil value can't be passed as string parameter
to `IsMultilineCommitMessage(string)` (or the StringUtils.Cut in later
PRs)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-01-07 10:40:30 +00:00
..
alert_details.tmpl
alert.tmpl Clean up polluted styles and remove dead CSS code (#24497) 2023-05-03 14:32:10 -04:00
disable_form_autofill.tmpl
footer_content.tmpl Backport ctx locale refactoring manually (#27231) (#27259) (#27260) 2023-09-25 13:15:51 +00:00
footer.tmpl Start using template context function (#26254) 2023-08-08 01:22:47 +00:00
head_navbar.tmpl Backport ctx locale refactoring manually (#27231) (#27259) (#27260) 2023-09-25 13:15:51 +00:00
head_opengraph.tmpl Avoid unnecessary 500 panic when a commit doesn't exist (#28719) (#28721) 2024-01-07 10:40:30 +00:00
head_script.tmpl Backport ctx locale refactoring manually (#27231) (#27259) (#27260) 2023-09-25 13:15:51 +00:00
head_style.tmpl Remove meta tags theme-color and default-theme (#24960) 2023-05-28 22:33:17 +00:00
head.tmpl Improve opengraph previews (#26851) 2023-09-01 16:59:24 +00:00
modal_actions_confirm.tmpl cleanup locale function usage (#27227) (#27240) 2023-09-25 00:21:38 +00:00
paginate.tmpl Backport ctx locale refactoring manually (#27231) (#27259) (#27260) 2023-09-25 13:15:51 +00:00