top-think / think-orm

Think ORM——the PHP Database&ORM Framework
Apache License 2.0
416 stars 173 forks source link

修复bindValue绑定长整型参数失精度,导致where无法正确匹配数据问题!!!该问题影响了thinkphp目前全部版本 #505

Closed slongzhang closed 2 months ago

slongzhang commented 1 year ago

修复php转换浮点数导致的精度问题,如

<?php

$a = '99999999999999';
echo (float)$a; // 99999999999999
$b = '999999999999999';
echo (float)$b; // 999999999999991.0E+15

而self::PARAM_FLOAT = 18已经超过了php的15位的长度了,会导致无法where匹配不上长整型的数据 该问题影响了thinkphp目前全部版本