|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-15 11:45 UTC] mansion@php.net
[2003-04-15 11:48 UTC] mansion@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 16 22:00:01 2025 UTC |
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