Bug #71612 [Opn->Fbk]: Set value random case change
Edit report at https://bugs.php.net/bug.php?id=71612&edit=1
ID: 71612
Updated by: ab@php.net
Reported by: keith at geerservices dot com
Summary: Set value random case change
-Status: Open
+Status: Feedback
Type: Bug
Package: *General Issues
Operating System: Windows Server 2012
PHP Version: 5.5.32
Block user comment: N
Private report: N
New Comment:
Thanks for the report. Please re-check your code and be sure _REQUEST contains the strings you
expect. If it appears to be correct, please provide a reproduce case involving _REQUEST. Your
current code snippet won't reproduce the issue you refer to - var_dump is used in nearly every
of over 12000 tests in the PHP's own test suite and such an issue would be discovered very
quickly otherwise.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2016-02-16 18:28:33] keith at geerservices dot com
Description:
------------
Random strings in either variables, passed method variables, or array values are being lower cased
periodically. This is happening at random. All of the times that this is being noticed is when the
code is needing to check if a string is in an array or to grab an indexed value from the $_REQUEST
var. In order to grab the $_REQUEST value by index, I have to array_change_key_case($_REQUEST) and
strtolower($index).
The test case below errors for me because "Maintenance" =/= "maintenance".
Test script:
---------------
$modules = array("Dashboard", "Calendar", "Maintenance", "Service
Orders", "Quotes", "Contacts");
var_dump($modules);
Expected result:
----------------
array(6) {
[0]=>
string(9) "Dashboard"
[1]=>
string(8) "Calendar"
[2]=>
string(11) "Maintenance"
[3]=>
string(14) "Service Orders"
[4]=>
string(6) "Quotes"
[5]=>
string(8) "Contacts"
}
Actual result:
--------------
array(6) {
[0]=>
string(9) "Dashboard"
[1]=>
string(8) "Calendar"
[2]=>
string(11) "maintenance"
[3]=>
string(14) "Service Orders"
[4]=>
string(6) "Quotes"
[5]=>
string(8) "Contacts"
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71612&edit=1
Thread (7 messages)