php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24392 simplexml failure on slashdot.rdf
Submitted: 2003-06-29 19:22 UTC Modified: 2003-11-29 01:56 UTC
From: shane@php.net Assigned: sterling (profile)
Status: Closed Package: XML related
PHP Version: 5CVS-2003-06-29 (dev) OS: win32
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: shane@php.net
New email:
PHP Version: OS:

 

 [2003-06-29 19:22 UTC] shane@php.net
Description:
------------
Sometimes simplexml objects return empty strings, even though var_dump shows the strings.  A simple example is using simplexml to parse rdf.  I grabbed an rdf from phpbuilder.com, and it worked wonderfully.  Grabbed one from slashdot, and failure.



Reproduce code:
---------------
grab slashdot rdf

http://slashdot.org/slashdot.rdf

parse with:

<?php
$rdf = simplexml_load_file('slashdot.rdf');
?>
<table border="1" cellspacing="0" cellpadding="0" bordercolor="#0000FF">
<tr>
    <td>
<table border="0" cellspacing="0" cellpadding="4">
<tr>
    <td style="background-color:blue; color:white;"><?php echo $rdf->channel->title; ?></td>
</tr>
<?php
foreach ($rdf->item as $item) {
// this dump shows the correct data, but emptiness below
// var_dump($item);  
?>
<tr>
    <td>
    <a href="<?php echo $item->link; ?>"><?php echo $item->title; ?></a>
    </td>
</tr>
<?php } ?>
</table>
    </td>
</tr>
</table>



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 12:53 UTC] sterling@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 [2003-07-19 08:54 UTC] helly@php.net
SimpleXML leaks....
 [2003-07-19 09:08 UTC] sniper@php.net
Sterling, fix the leaks. :-p

 [2003-11-29 01:56 UTC] sniper@php.net
Open new report about the leaks..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC