|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39382 "Undeclared entity error" with latin1 entities
Submitted: 2006-11-04 20:31 UTC Modified: 2006-11-04 21:24 UTC
From: phpbugs at thequod dot de Assigned:
Status: Not a bug Package: XML related
PHP Version: 5CVS-2006-11-04 (CVS) OS: Ubuntu Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: phpbugs at thequod dot de
New email:
PHP Version: OS:


 [2006-11-04 20:31 UTC] phpbugs at thequod dot de
Using a regular entity like "®" throws a "Undeclared 
entity warning" error with xml_parse().

If this is bogus, please give a hint about what I'm doing 
Is this maybe a libxml problem?

btw: it also fails with other DOCTYPEs or with a full 
html-head-body construct.

Reproduce code:
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

$parser = xml_parser_create();
if (!xml_parse($parser, $xml))
    echo xml_error_string(xml_get_error_code($parser)) . "\n";

Expected result:

(as with PHP4)

Actual result:
Undeclared entity warning


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-04 21:24 UTC] phpbugs at thequod dot de
I'm closing it myself. explains why it does 
not work.

Would be interested in why it works with PHP4 though..
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jan 21 16:01:23 2021 UTC