Bug #71914 [Com]: Reference is lost in case
| From: | info at nepda dot eu | Date: | Thu, 07 Apr 2016 16:33:28 +0000 |
| Subject: | Bug #71914 [Com]: Reference is lost in case | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-200428@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71914&edit=1
ID: 71914
Comment by: info at nepda dot eu
Reported by: laruence@php.net
Summary: Reference is lost in case
Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 7.0.5
Assigned To: bwoebi
Block user comment: N
Private report: N
New Comment:
When do you publish a new version of PHP (7.0.6!?) with this patch? My code does not work with this
bug and I want to use the latest stable version of PHP to be not vulnerable.
Previous Comments:
------------------------------------------------------------------------
[2016-04-07 06:18:56] nikic@php.net
Related To: Bug #71975
------------------------------------------------------------------------
[2016-03-29 09:15:03] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2e6d70787c93413daecbea529bf0f74fa901d1db
Log: Fixed bug #71914 (Reference is lost in "switch")
------------------------------------------------------------------------
[2016-03-29 09:11:25] laruence@php.net
Description:
------------
thanks for the ssh access by Spritz, reference is lost after case statement.
Test script:
---------------
<?php
function bug(&$value) {
switch ($value) {
case "xxxx":
$value = true;
break;
}
}
function test($arr, &$dummy) {
bug($arr["str"]);
var_dump($arr);
}
$array = array("str" => "xxxx");
test($array, $array["str"]);
Expected result:
----------------
true
Actual result:
--------------
string(4) "xxxx"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71914&edit=1