php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46136 DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID xxx already defined
Submitted: 2008-09-20 11:41 UTC Modified: 2008-09-20 14:52 UTC
From: mathieu dot lagana at gmail dot com Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5.2.6 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
11 + 2 = ?
Subscribe to this entry?

 
 [2008-09-20 11:41 UTC] mathieu dot lagana at gmail dot com
Description:
------------
Set warning on anchor id 

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID xxx already defined in http://www.w3.org, line: 428

Reproduce code:
---------------
<?php

$dom=new DOMDocument();
$dom->loadHTMLFile("http://www.w3.org");
//idem for loadHTML()

Expected result:
----------------
nothhing

Actual result:
--------------
DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID technologies already defined in http://www.w3.org, line: 94

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID news already defined in http://www.w3.org, line: 264

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID search already defined in http://www.w3.org, line: 315

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID contents already defined in http://www.w3.org, line: 332

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID Offices already defined in http://www.w3.org, line: 428

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID systems already defined in http://www.w3.org, line: 482

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID donors already defined in http://www.w3.org, line: 493

DOMDocument::loadHTMLFile() [domdocument.loadhtmlfile]: ID footnotes already defined in http://www.w3.org, line: 496

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-09-20 14:29 UTC] tularis@php.net
Could you please explain what you believe the actual BUG is here? "Set warning on anchor id" by itself doesn't tell me anything. Please explain _why_ you believe what you see is wrong.
 [2008-09-20 14:52 UTC] rrichards@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You're using HTML 4 rules to load an XHTML document. Either use the 
load() method to parse as XML or the libxml_use_internal_errors() 
function to ignore the warnings.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 11:01:27 2024 UTC