From:             stevenv at optonline dot net
Operating system: 
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  Bugs in example 2 of xml documentation

Description:
------------
There are two similar problems in the functions startElement() and
endElement() in example 2 on <http://us2.php.net/xml>.



1) $htmltag, which springs into existence out of nowhere, is being used in
a comparison. I think it was meant to be $name rather than $htmltag.



2) I think the following lines:



   if ($htmltag == $map_array[$name]) {

       echo "<$htmltag>";



should be:



   if ( isset($map_array[$name]) ) {

       echo "<$map_array[$name]>";



Otherwise the output will be identical to the input (no conversion).


-- 
Edit bug report at http://bugs.php.net/?id=27574&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27574&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27574&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27574&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27574&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27574&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27574&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27574&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27574&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27574&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27574&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27574&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27574&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27574&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27574&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27574&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27574&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27574&r=float

Reply via email to