#24063 [Bgs->Opn]: Notice: unserialize(): Error at offset ...
| From: | jparneodo at yahoo dot fr | Date: | Mon, 09 Jun 2003 08:50:31 +0000 |
| Subject: | #24063 [Bgs->Opn]: Notice: unserialize(): Error at offset ... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-41495@lists.php.net to get a copy of this message | ||
ID: 24063
User updated by: jparneodo at yahoo dot fr
Reported By: jparneodo at yahoo dot fr
-Status: Bogus
+Status: Open
Bug Type: Scripting Engine problem
Operating System: RH7.3
PHP Version: 4.3.2
New Comment:
Serialise on 4.3.2 and 4.3.0 has not the same result:
4.3.2= d:1E-06;
4.3.0= d::.E-7;
<?php
echo phpversion();
$f=1.0e-6;
$s=serialize($f);
$ff=unserialize($s);
echo "\n\n$s";
?>
// Output with php-4.3.2/sapi/cli/php
4.3.2
Notice: unserialize(): Error at offset 0 of 8 bytes in - on line 5
d::.E-7;
// Output with php-4.3.0 apache 1.3.27 on RedHat
4.3.0
d:1E-06;
// Same result on RH9.0 with all php-4.3.2RCi
http://marc.theaimsgroup.com/?l=php-dev&m=105491350013813&w=2
Previous Comments:
------------------------------------------------------------------------
[2003-06-06 14:36:44] sniper@php.net
Withing RH 6.2 the original object is identical to the
one after serialize/unserialize. No bug here.
------------------------------------------------------------------------
[2003-06-06 11:08:04] jparneodo at yahoo dot fr
class C {
var $bad_1 = 1e-6; // Bug in unserialize
var $bad_2 = 1.0e-6; // Bug in unserialize
var $ok__1 = 1.1e-6;
var $ok__2 = 9e-7;
}
$c=new C();
$s=serialize($c);
$cc=unserialize($s);
/*
Values like 0.00001 (one)
seems to be fatal!
*/
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24063&edit=1