|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-02-12 21:06 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 11:00:02 2025 UTC |
Description: ------------ Tested on PHP 5.1.3 -> 5.2.1 Using addAttribute() when referring to a child called "Host" causes PHP to return a CGI Error. Reproduce code: --------------- <?php $string = <<<XML <?xml version="1.0"?> <Host enable="true"> <Name>host.server.com</Name> </Host> XML; $xml = simplexml_load_string($string); $add = $xml->addChild('Host'); $add->Host->addAttribute('enable', 'true'); ?> Expected result: ---------------- Running it should add a child called "Host" and add the attribute "enable" with the value "true". Actual result: -------------- $add = $xml->addChild('Host') works fine. Adding an attribute to a child named "Host" however, results in: "The specified CGI application misbehaved by not returning a complete set of HTTP headers."