From: Nikita Popov Date: Tue, 1 Sep 2020 09:42:05 +0000 (+0200) Subject: Add explicit double cast X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=682823b75bd8fc11a2f1f2c1d1a11cdeea26c847;p=php Add explicit double cast Avoid precision warning. --- diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index c0b3d1d6ff..e942f10fac 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -636,7 +636,7 @@ mysqlnd_stmt_execute_prepare_param_types(MYSQLND_STMT_DATA * stmt, zval ** copie Check bug #52891 : Wrong data inserted with mysqli/mysqlnd when using bind_param, value > LONG_MAX We do transformation here, which will be used later when sending types. The code later relies on this. */ - if (d > ZEND_LONG_MAX || d < ZEND_LONG_MIN) { + if (d >= (double) ZEND_LONG_MAX || d < (double) ZEND_LONG_MIN) { stmt->send_types_to_server = *resend_types_next_time = 1; convert_to_string_ex(tmp_data); } else {