[pLog-svn] r4498 - plog/trunk/class/xml/rssparser
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jan 4 22:40:37 GMT 2007
Author: oscar
Date: 2007-01-04 22:40:36 +0000 (Thu, 04 Jan 2007)
New Revision: 4498
Modified:
plog/trunk/class/xml/rssparser/rssitem.class.php
Log:
removed a bunch of warnings and notices
Modified: plog/trunk/class/xml/rssparser/rssitem.class.php
===================================================================
--- plog/trunk/class/xml/rssparser/rssitem.class.php 2007-01-04 22:35:29 UTC (rev 4497)
+++ plog/trunk/class/xml/rssparser/rssitem.class.php 2007-01-04 22:40:36 UTC (rev 4498)
@@ -31,16 +31,18 @@
*/
function RSSItem( $item )
{
- $this->_link = $item["link"];
- $this->_title = $item["title"];
- $this->_image = $item["image"];
- $this->_description = $item["description"];
+ $this->_link = isset( $item["link"] ) ? $item["link"] : "";
+ $this->_title = isset( $item["title"] ) ? $item["title"] : "";
+ $this->_image = isset( $item["image"] ) ? $item["image"] : "";
+ $this->_description = isset( $item["description"] ) ? $item["description"] : "";
// process the enclosures, if any
$this->_enclosures = Array();
- if( is_array( $item["enclosure"] )) {
- foreach( $item["enclosure"] as $enclosure ) {
- array_push( $this->_enclosures, new RssEnclosure( $enclosure ));
+ if( isset( $item["enclosure"] )) {
+ if( is_array( $item["enclosure"] )) {
+ foreach( $item["enclosure"] as $enclosure ) {
+ array_push( $this->_enclosures, new RssEnclosure( $enclosure ));
+ }
}
}
More information about the pLog-svn
mailing list