gophp
gophp copied to clipboard
slice order changes
Hi guys. You have a mistake in your code that messes up the order of elements inside the slice. I'm sorry I didn't save your original code but to fix it you need to change the code in file unserialize.go starting from line 208 to this code:
if indexLen == arrLen {
var slice []interface{}
for i := 0; i < arrLen; i++ {
n, _ := utils.NumericalToString(i)
slice = append(slice, val[n])
}
return slice, nil
}
Have a nice day and thanks for your work! It's awesome besides this issue
@booksmaster Hi, Can you update to the latest version and try ?
It has been fixed https://github.com/leeqvip/gophp/pull/14