|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-09-25 10:43 UTC] sjoerd@php.net
[2009-09-25 11:14 UTC] ralph at bean-it dot nl
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 17:00:01 2025 UTC |
Description: ------------ An invalid character error is raised when I want to set an attribute on a DomElement. When I put my code in a try ... catch everything works fine Reproduce code: --------------- $doc = new DOMDocument('1.0', 'iso-8859-1'); $node = $doc->createElement('test'); $newnode = $doc->appendChild($node); $newnode->setAttribute("name application", "MyApp"); Raises an error $newnode->setAttribute("0001", "File"); Also raises an error Expected result: ---------------- The attribute is set on my DomElement Actual result: -------------- 'DOMException' with message 'Invalid Character Error'