|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-02 23:53 UTC] cataphract@php.net
-Status: Open
+Status: Bogus
[2010-10-02 23:54 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 19:00:02 2025 UTC |
Description: ------------ It seems like there's a bug when trying to set a value to the 'disabled' attribute using the DOMElement::setAttribute($name, $value) function. Test script: --------------- <?php $dom = new DOMDocument(); $a = $dom -> createElement('input'); $a -> setAttribute('disabled', 'ok'); $dom -> appendChild($a); $b = $dom -> createElement('input'); $b -> setAttribute('disabled', 'somethingelse'); $dom -> appendChild($b); $c = $dom -> createElement('input'); $c -> setAttribute('required', 'required'); $dom -> appendChild($c); echo $dom ->saveHTML(); ?> Expected result: ---------------- <input disabled="disabled"><input disabled="somethingelse"><input required="required"> Actual result: -------------- <input disabled><input disabled><input required="required">