From a7042bd65dd12f24501e5e4f5e6d022d2172e35c Mon Sep 17 00:00:00 2001
From: Gordon Heydon <gordon@heydon.com.au>
Date: Tue, 10 Apr 2012 14:42:25 +1000
Subject: [PATCH] Issue #1435264 by FanisTsiros: Fixed Xml stops working
 Uncaught exception 'XMLSitemapGenerationException' error.

---
 .../contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sites/all/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc b/sites/all/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc
index 0ea1bb7..f07d57b 100644
--- a/sites/all/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc
+++ b/sites/all/modules/contrib/xmlsitemap/xmlsitemap.xmlsitemap.inc
@@ -158,7 +158,7 @@ class XMLSitemapWriter extends XMLWriter {
   public function endDocument() {
     $return = parent::endDocument();
 
-    if (!$this->getStatus()) {
+    if (!$return) {
       throw new XMLSitemapGenerationException(t('Unknown error occurred while writing to file @file.', array('@file' => $this->uri)));
     }
 
-- 
1.7.5.4

