#31282 [NEW]: Unexpected result
| From: | robertkraig at gmail dot com | Date: | Fri, 24 Dec 2004 08:52:34 +0000 |
| Subject: | #31282 [NEW]: Unexpected result | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-71027@lists.php.net to get a copy of this message | ||
From: robertkraig at gmail dot com
Operating system: Linux
PHP version: 5.0.3
PHP Bug Type: SimpleXML related
Bug description: Unexpected result
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) {
}
--
Edit bug report at http://bugs.php.net/?id=31282&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31282&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31282&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31282&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31282&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31282&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31282&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31282&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31282&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31282&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31282&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31282&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31282&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31282&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31282&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31282&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31282&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31282&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31282&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31282&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31282&r=mysqlcfg