Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001388 [Quercus] minor always 10-03-06 09:59 10-06-06 15:21
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.0.21
Summary 0001388: SimpleXMLElement bug
Description (rep by David Berry, see mail for attachment)

Found two more bugs. Here are the test files to duplicate the problem.

Problem 1: Empty elements return the value \\\\\\\"SimpleXMLElement Object\\\\\\\"

Problem 2: Elements that contain the \\\\\\\'@\\\\\\\' character get truncated at the \\\\\\\'@\\\\\\\'.
\\\\\\\"don\\\\\\\'t touch @ this\\\\\\\" becomes \\\\\\\"don\\\\\\\'t touch \\\\\\\". This happens even if the text
is wrapped with <![CDATA[]]>


I found these trying to chase down another bug. Perhaps you have heard of
this. I get a consistent error where the value of these xml elements becomes
\\\\\\\"ARRAY\\\\\\\". I have not been successful in duplicating this error. Have you
heard of any one else getting \\\\\\\"ARRAY\\\\\\\" when they are assigning a primitive
value to a variable.
Additional Information
Attached Files

- Relationships

- Notes
(0001533)
emil
10-03-06 17:07
edited on: 10-03-06 17:08

The following script outputs different values to the browser and the log, but shouldn\\\'t. This may have something to do which how echo is parsed: it splits append expressions, but normal functions evaluate them lazily.

<?php
$xmlstr = <<<XML
<?xml version=\\\'1.0\\\' standalone=\\\'yes\\\'?>
<a>
  &lt;b>
    <c>
    Sample data 1
    </c>
  
  &lt;b>
    <c>
    Sample data 2
    </c>
  
</a>
XML;

$xml = simplexml_load_string($xmlstr);

foreach ($xml->b as $b) {
  echo \\\"a->b: \\\" . $b->c . \\\"
\\\";
  syslog(STDERR, \\\"a->b: \\\" . $b->c);
}

?>

 
(0001535)
ferg
10-06-06 15:21

php/1x0b
 

- Issue History
Date Modified Username Field Change
10-03-06 09:59 ferg New Issue
10-03-06 17:07 emil Note Added: 0001533
10-03-06 17:07 emil Description Updated
10-03-06 17:08 emil Note Edited: 0001533
10-06-06 15:21 ferg Note Added: 0001535
10-06-06 15:21 ferg Assigned To  => ferg
10-06-06 15:21 ferg Status new => closed
10-06-06 15:21 ferg Resolution open => fixed
10-06-06 15:21 ferg Fixed in Version  => 3.1.0
10-06-06 15:21 ferg Description Updated


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
34 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker