#22628 [NEW]: getAttribute case sensitivity
| From: | ianh at hardersoft dot com | Date: | Mon, 10 Mar 2003 23:36:14 +0000 |
| Subject: | #22628 [NEW]: getAttribute case sensitivity | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-14176@lists.php.net to get a copy of this message | ||
From: ianh at hardersoft dot com
Operating system: Linux
PHP version: 4.3.1
PHP Bug Type: PEAR related
Bug description: getAttribute case sensitivity
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 bug report at http://bugs.php.net/?id=22628&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22628&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22628&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22628&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22628&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22628&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22628&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22628&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22628&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22628&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22628&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22628&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22628&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22628&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22628&r=gnused