Bug #71612 [NEW]: Set value random case change
| From: | keith at geerservices dot com | Date: | Tue, 16 Feb 2016 18:28:35 +0000 |
| Subject: | Bug #71612 [NEW]: Set value random case change | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-199272@lists.php.net to get a copy of this message | ||
From: keith at geerservices dot com
Operating system: Windows Server 2012
PHP version: 5.5.32
Package: *General Issues
Bug Type: Bug
Bug description:Set value random case change
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 bug report at https://bugs.php.net/bug.php?id=71612&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71612&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71612&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71612&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71612&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71612&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71612&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71612&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71612&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71612&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71612&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71612&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71612&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71612&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71612&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71612&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71612&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71612&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71612&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71612&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71612&r=mysqlcfg