#22628 [Opn->Csd]: getAttribute case sensitivity
| From: | mansion@php.net | Date: | Tue, 15 Apr 2003 16:45:52 +0000 |
| Subject: | #22628 [Opn->Csd]: getAttribute case sensitivity | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-15186@lists.php.net to get a copy of this message | ||
ID: 22628
Updated by: mansion@php.net
Reported By: ianh at hardersoft dot com
-Status: Open
+Status: Closed
Bug Type: PEAR related
Operating System: Linux
PHP Version: 4.3.1
New Comment:
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
Previous Comments:
------------------------------------------------------------------------
[2003-03-10 17:36:14] ianh at hardersoft dot com
I have been working with PEAR and find it excellent for development of
web-based apps.
Currently I am working on a dbgrid that inherits from the latest
HTML_Common, and am storing all its attributes using the standard
attribute store/retrieve methods.
I found an inconsistency in the way that an attribute is stored and
retrieved. I couldn't find it anywhere in the bug database. The
following code replicates the problem:
------
<?php
require_once "HTML/Common.php";
$htmlObj = new HTML_Common;
$htmlObj->updateAttributes(array("someAttribute" => "someValue"));
$htmlObj->updateAttributes(array("anotherattribute" =>
"anotherValue"));
$result = "someAttribute: " . $htmlObj->getAttribute("someAttribute") .
"<BR>";
$result .= "anotherattribute: " .
$htmlObj->getAttribute("anotherattribute");
echo $result;
?>
------
Output:
someAttribute:
anotherattribute: anotherValue
------
The problem is during storage of the array element, where the attribute
name is not set to lowercase. The mixed case name appears to be stored
in the updateAttributes method, but during the getAttribute method it
is set to lowercase.
This appears to be a bug. If not, it is an odd feature :-)
I have not included a list of modules because I don't believe it is
relevant.
Please contact me if I can provide any more details or be of help in
any other way.
Best regards,
Ian Harder
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22628&edit=1