php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31282 Unexpected result
Submitted: 2004-12-24 09:52 UTC Modified: 2004-12-24 11:00 UTC
From: robertkraig at gmail dot com Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.0.3 OS: Linux
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: robertkraig at gmail dot com
New email:
PHP Version: OS:

 

 [2004-12-24 09:52 UTC] robertkraig at gmail dot com
Description:
------------
Well, essentially, what i did was put these code in a php file to see how the array was structured in order to get content for my rss feed,

<?php

$file = "http://crypticreign.techieswithcats.com/index.xml";
$rss = simplexml_load_file($file); 
print "<pre>"; 
print_r($rss); 
print "</pre>";

?>
and i was expecting it to parse out all of the xml child entities exactly how it did with every other entity, but what it did was print out 1 missing arrays.

Reproduce code:
---------------
    <item>
      <title>del.icio.us</title>
      <link>http://crypticreign.techieswithcats.com/archives/004254.html</link>

      <description>I created an account on del.icio.us last night. I spent my late night putting all my current and old bookmarks...</description>
      <guid isPermaLink="false">4254@http://crypticreign.techieswithcats.com/</guid>
      <content:encoded><![CDATA[<p>I created an account on <a href="http://del.icio.us/">del.icio.us</a> last night.  I spent my late night putting all my current and old bookmarks on the site, and catagorizing them all.  I found a bookmarks.html from Firefox (Firebird at the time) from over a year ago on my old 40 gig on my server.  I missed these bookmarks and I'm so glad to have them back!</p>

<p>The site is really fun to keep up on, and a great way to keep track of my bookmarks.. or just links that I dont want to forget.  Im using the recommendation from <a href="http://www.veen.com/jeff/delicious-tutorial.html">Jeff Veen's site</a>.  He uses <a href="http://www.bigbold.com/rssdigest/index.html">RSS Digest</a> to create a javascript applet that displays your del.icio.us rss feed.  (Note: I just found both these links in my del.icio.us account). I added this to my sidebar on this blog.  It updates from my feed every 30 minutes. Cool stuff!</p>]]></content:encoded>
      <dc:subject></dc:subject>
      <dc:date>2004-10-27T14:00:32-05:00</dc:date>
    </item>

Expected result:
----------------
array with every single entity, but instead, because of <![CDATA[ i get a blank pointer

Actual result:
--------------
        ["encoded"]=>
        object(SimpleXMLElement)#10 (0) {
        }

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-24 11:00 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

No bugs here.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Oct 01 21:05:52 2022 UTC