ID:               27646
 Updated by:       [EMAIL PROTECTED]
 Reported By:      matthew_kay at ml1 dot net
-Status:           Feedback
+Status:           Closed
 Bug Type:         Zend Engine 2 problem
 Operating System: Linux 2.4.22 (Mandrake 9.2)
 PHP Version:      5.0.0RC1
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-03-23 16:01:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

------------------------------------------------------------------------

[2004-03-18 21:29:14] matthew_kay at ml1 dot net

Description:
------------
It appears that unserialize() does not unserialize 

numerics that are "non-finite", such as NAN and INF. 

Instead, it simply fails and returns (bool)false. 

 

If a NAN value is encountered anywhere during an 

unserialize() (for example, in an array or an object), the 

entire operation fails and unserialize will return false. 

Reproduce code:
---------------
$testNan = (float)NAN;

var_dump($testNan); //outputs float(NAN)

$testNan2 = unserialize(serialize($testNan));

var_dump($testNan2); //outputs bool(false)



$testInf = (float)INF;

var_dump($testInf); //outputs float(INF)

$testInf2 = unserialize(serialize($testInf));

var_dump($testInf2); //outputs bool(false)

Expected result:
----------------
float(NAN) 

float(NAN) 

float(INF) 

float(INF) 

Actual result:
--------------
float(NAN) 

bool(false) 

float(INF) 

bool(false) 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27646&edit=1

Reply via email to