Bug #52976 [NEW]: DOMAttribute 'disabled' can't have a value
| From: | contact at jubianchi dot fr | Date: | Sat, 02 Oct 2010 20:37:12 +0000 |
| Subject: | Bug #52976 [NEW]: DOMAttribute 'disabled' can't have a value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-154843@lists.php.net to get a copy of this message | ||
From:
Operating system: OS X 10.6.4
PHP version: 5.3.3
Package: DOM XML related
Bug Type: Bug
Bug description:DOMAttribute 'disabled' can't have a value
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">
--
Edit bug report at http://bugs.php.net/bug.php?id=52976&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52976&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52976&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52976&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52976&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52976&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52976&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52976&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52976&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52976&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52976&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52976&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52976&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52976&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52976&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52976&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52976&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52976&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52976&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52976&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52976&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52976&r=mysqlcfg