|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-02 12:54 UTC] rrichards@php.net
[2007-05-02 14:50 UTC] daniel dot oconnor at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 19:00:01 2025 UTC |
Description: ------------ Inconsistent behaviour when raising exceptions. No exception is raised until line 10 Reproduce code: --------------- <?php $d = new DOMDocument(); $example = $d->createElementNS('http://foo.com','example'); $example->setAttributeNS('http://bar.com', 'bar:bar',"value"); $example->setAttributeNS('http://bar.com', 'monkey',"value"); $d = new DOMDocument(); $example = $d->createElementNS('http://foo.com','example'); $example->setAttributeNS('http://fish.com', 'bar:bar',"value"); $example->setAttributeNS('http://bar.com', 'monkey',"value"); Expected result: ---------------- 1. An exception raised on the second setAttributeNS (line 4) 2. A more meaningful error than 'Namespace Error' - "No namespace prefix found for <http://fish.com>" Actual result: -------------- An exception on line 10