iliaa Sun Jun 29 21:05:03 2003 EDT
Added files: (Branch: PHP_4_3)
/php-src/ext/standard/tests/serialize bug24063.phpt
Modified files:
/php-src/main snprintf.c
/php-src/ext/standard/tests/serialize 003.phpt
/php-src NEWS
Log:
MFH: fix for bug #24063
Index: php-src/main/snprintf.c
diff -u php-src/main/snprintf.c:1.17.4.4 php-src/main/snprintf.c:1.17.4.5
--- php-src/main/snprintf.c:1.17.4.4 Mon May 5 15:54:41 2003
+++ php-src/main/snprintf.c Sun Jun 29 21:05:02 2003
@@ -384,6 +384,9 @@
*p2++ = '.';
for (i = 1; i < ndigit; i++)
*p2++ = *p1++;
+ if (*(p2 - 1) == '.') {
+ *p2++ = '0';
+ }
*p2++ = 'e';
if (decpt < 0) {
decpt = -decpt;
Index: php-src/ext/standard/tests/serialize/003.phpt
diff -u php-src/ext/standard/tests/serialize/003.phpt:1.1.4.5
php-src/ext/standard/tests/serialize/003.phpt:1.1.4.6
--- php-src/ext/standard/tests/serialize/003.phpt:1.1.4.5 Wed May 21 03:24:28
2003
+++ php-src/ext/standard/tests/serialize/003.phpt Sun Jun 29 21:05:02 2003
@@ -22,4 +22,4 @@
float\(8\.529E-22\)
d:9\.[0-9]*E-9;
-float\(9\.E-9\)
+float\(9\.0E-9\)
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.271 php-src/NEWS:1.1247.2.272
--- php-src/NEWS:1.1247.2.271 Sun Jun 29 19:02:33 2003
+++ php-src/NEWS Sun Jun 29 21:05:02 2003
@@ -5,11 +5,13 @@
- Fixed FastCGI IIS document root problem. (Shane)
- Fixed corruption of multibyte character including 0x5c as second
byte in multipart/form-data. (Rui)
-- Fixed bug #24312 (base64_decode() does not skip 0xF0-0xFF characters).
- (gereon.steffens[at]onvista.de, Ilia)
- Fixed bug #24313 (file_exist() warning on non-existent files
when open_basedir is used). (Ilia)
+- Fixed bug #24312 (base64_decode() does not skip 0xF0-0xFF characters).
+ (gereon.steffens[at]onvista.de, Ilia)
- Fixed bug #24284 (Fixed memory leak inside pg_ping()). (Ilia)
+- Fixed bug #24063 (*printf() did not handle scientific notation correctly).
+ (Ilia)
- Fixed bug #24028 (Reading raw post message by php://input failed). (Jani)
- Fixed bug #24009 FastCGI handling of file not found. (Shane)
- Fixed bug #23664 FastCGI socket listenting. (Shane)
Index: php-src/ext/standard/tests/serialize/bug24063.phpt
+++ php-src/ext/standard/tests/serialize/bug24063.phpt
--TEST--
Bug #24063 (serialize() missing 0 after the . on scientific notation)
--INI--
serialize_precision=100
precision=12
--FILE--
<?php
$f = 1.0e-6;
$s = serialize($f);
var_dump($s, unserialize($s));
?>
--EXPECT--
string(9) "d:1.0E-6;"
float(1.0E-6)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php