]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-8.0'
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 5 Feb 2021 12:12:30 +0000 (13:12 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 5 Feb 2021 12:12:30 +0000 (13:12 +0100)
* PHP-8.0:
  Fix #74779: x() and y() truncating floats to integers

1  2 
ext/mysqlnd/mysqlnd_wireprotocol.c

index 7a66d05c758b0668289a873de4e74ce26763f9aa,f98cb6c9711f17cd858ece1c4c027177c6c1cc00..252fc0e8fc2b2e7ce7c76a26600871c768f30b69
@@@ -1653,9 -1667,11 +1653,9 @@@ php_mysqlnd_rowp_read_text_protocol(MYS
                                zend_uchar save = *(p + len);
                                /* We have to make it ASCIIZ temporarily */
                                *(p + len) = '\0';
-                               ZVAL_DOUBLE(current_field, atof((char *) p));
+                               ZVAL_DOUBLE(current_field, zend_strtod((char *) p, NULL));
                                *(p + len) = save;
 -                      }
 -#endif /* MYSQLND_STRING_TO_INT_CONVERSION */
 -                      else {
 +                      } else {
                                ZVAL_STRINGL_FAST(current_field, (char *)p, len);
                        }
                        p += len;