Skip to content

Commit a5a42b0

Browse files
author
Vadim Petrov
committed
Try to convert value to int before converting to float64
1 parent 230ff88 commit a5a42b0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: php_serialize/common_helper.go

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ func PhpValueFloat64(p PhpValue) (res float64) {
9595
case string:
9696
str, _ := p.(string)
9797
res, _ = strconv.ParseFloat(str, 64)
98+
default:
99+
return float64(PhpValueInt(p))
98100
}
99101
return
100102
}

0 commit comments

Comments
 (0)