#39382 [NEW]: "Undeclared entity error"
From: phpbugs at thequod dot de
Operating system: Ubuntu Linux
PHP version: 5CVS-2006-11-04 (CVS)
PHP Bug Type: XML related
Bug description: "Undeclared entity error"
Description:
------------
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
wrong.
Is this maybe a libxml problem?
btw: it also fails with other DOCTYPEs or with a full
html-head-body construct.
Reproduce code:
---------------
<?php
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<body>®</body>';
$parser = xml_parser_create();
if (!xml_parse($parser, $xml))
{
echo xml_error_string(xml_get_error_code($parser)) . "\n";
}
xml_parser_free($parser);
?>
Expected result:
----------------
Nothing.
(as with PHP4)
Actual result:
--------------
Undeclared entity warning
--
Edit bug report at http://bugs.php.net/?id=39382&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39382&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39382&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39382&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39382&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39382&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39382&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39382&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39382&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39382&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39382&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39382&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39382&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39382&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39382&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39382&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39382&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39382&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39382&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39382&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39382&r=mysqlcfg
Thread (2 messages)
- phpbugs at thequod dot de