php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30984 SimpleXML objects not being read from saved session
Submitted: 2004-12-04 20:00 UTC Modified: 2004-12-05 11:17 UTC
Votes:5
Avg. Score:4.4 ± 1.2
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:0 (0.0%)
From: kturner at kgt dot net Assigned:
Status: Wont fix Package: SimpleXML related
PHP Version: 5.0.2 OS: Windows 2003 Server
Private report: No CVE-ID: None
 [2004-12-04 20:00 UTC] kturner at kgt dot net
Description:
------------
SimpleXML objects can be saved into a session file, but, they are not being extracted.


Reproduce code:
---------------
<?php	session_start();	// TEST1.PHP
$xml_string = <<< EOT
<GenQuoteDetails>
 <BaseFareAmt>26400</BaseFareAmt>
<TaxDataAry><TaxData><Country>US</Country><Amt>00019.80</Amt></TaxData></TaxDataAry>
</GenQuoteDetails>
EOT;
$xml_tree = simplexml_load_string( $xml_string );
$_SESSION['tree']	= $xml_tree;
echo"<pre>";print_r($xml_tree);echo"</pre>";
?>

<?php	session_start();	// TEST2.PHP
$xml_tree = $_SESSION['tree'];
echo"<pre>";print_r($xml_tree);echo"</pre>";
?>

Expected result:
----------------
SimpleXMLElement Object
(
    [BaseFareAmt] => 26400
    [TaxDataAry] => SimpleXMLElement Object
        (
            [TaxData] => SimpleXMLElement Object
                (
                    [Country] => US
                    [Amt] => 00019.80
                )

        )

)



Actual result:
--------------
SimpleXMLElement Object
(
)



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-05 11:18 UTC] chregu@php.net
Doesn't work. Neither with SimpleXML nor with DOM.

Expected behaviour.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC