0
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-02-14 19:40:48 -05:00
forgejo/templates
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
..
admin
api/packages/pypi
base Avoid unnecessary 500 panic when a commit doesn't exist (#28719) (#28721) 2024-01-07 10:40:30 +00:00
code
custom
devtest
explore
mail
org
package
projects
repo
shared
status
swagger
user
webhook
home.tmpl
install.tmpl
post-install.tmpl