diff --git a/0.3/class_rssfeed.php b/0.3/class_rssfeed.php index 3528e78..59fd431 100755 --- a/0.3/class_rssfeed.php +++ b/0.3/class_rssfeed.php @@ -198,8 +198,8 @@ class FileRSSFeed extends RSSFeed { foreach($merger->getFeeds(20) as $f) { parent::addItem($f->title,$f->link,$f->description,$f->author,$f->guid,$f->time); } - - file_put_contents( $this->filename, $this->xml->asXML() ); + + file_put_contents( $this->filename, $this->xml->asXML(), LOCK_EX ); } } diff --git a/0.3/functions.php b/0.3/functions.php index 7cb6408..bd8e732 100755 --- a/0.3/functions.php +++ b/0.3/functions.php @@ -89,9 +89,14 @@ function createAutoblog($type, $sitename, $siteurl, $rssurl, $error = array()) { /** * RSS **/ - require_once('class_rssfeed.php'); - $rss = new AutoblogRSS(RSS_FILE); - $rss->addNewAutoblog($sitename, $foldername, $siteurl, $rssurl); + try { + require_once('class_rssfeed.php'); + $rss = new AutoblogRSS(RSS_FILE); + $rss->addNewAutoblog($sitename, $foldername, $siteurl, $rssurl); + } + catch (Exception $e) { + ; + } $fp = fopen($foldername .'/index.php', 'w+'); if( !fwrite($fp, "") )