reflect.Value.Bytes() should only be called when reflect.Value.Kind()… #1346
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1346
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix for issue #1345.
I noticed that in value2Interface function in session_convert.go, we are using reflect.Value.Bytes() function when the fieldType is reflect.Array OR reflect.Slice. However, go's reflect.Value.Bytes() only works when the value is of type reflect.Slice, and panics otherwise.
I would propose that change the if condition from:
to
This PR fixes this.
Codecov Report
22.29% <100%> (ø)
66.66% <0%> (ø)
Continue to review full report at Codecov.
Do I need to do something to pass the WIP check? :/