Edit report at https://bugs.php.net/bug.php?id=62653&edit=1

 ID:                 62653
 Updated by:         jpa...@php.net
 Reported by:        davidso1 at rose-hulman dot edu
 Summary:            unset($array[$float]) causes a crash
 Status:             Open
 Type:               Bug
-Package:            Apache2 related
+Package:            Scripting Engine problem
 Operating System:   Windows Server
 PHP Version:        5.4.5
 Block user comment: N
 Private report:     N

 New Comment:

Switch to Scripting Engine Problem as bug type


Previous Comments:
------------------------------------------------------------------------
[2012-07-25 13:40:44] larue...@php.net

I can no reproduce this on Linux redhat

------------------------------------------------------------------------
[2012-07-24 19:27:22] s...@php.net

The testcase produces invalid reads & writes in valgrind.

------------------------------------------------------------------------
[2012-07-24 16:16:05] davidso1 at rose-hulman dot edu

Description:
------------
The test code crashes apache in the 5.4+ environment.
$foo starts as a string, gets interpreted as a double but it isn't I guess.

unset($array[(double) $foo]) works as expected

Test script:
---------------
$array = array("5"=>"bar");
$foo = "10.0000"; // gettype($foo) = "string"
$foo /= 2; //Makes $foo = 5 but still gettype($foo) = "double"
unset($array[$foo]);
print_r($array);

Expected result:
----------------
Array()

Actual result:
--------------
Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.


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



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

Reply via email to