Showing 1 changed files with 6 additions and 4 deletions
+6 -4
index.php
... ...
@@ -64,10 +64,12 @@ function NewsSection($sourceHTML) {
64 64
         elHtml += '</style>';
65 65
         elHtml += '</head><body>';
66 66
         for(index=0; index < <?php echo $NEWS_RSS_MAX_ITEMS; ?>; index++) {
67
-          var string_index = "article-"+index;
68
-          elHtml += document.getElementById(index).innerHTML;
69
-          console.log(document.getElementById(index).innerHTML);
70
-          elHtml += '<hr>';
67
+          if( null != document.getElementById(index) ) {
68
+            elHtml += document.getElementById(index).innerHTML;
69
+            elHtml += '<hr>';
70
+          } else {
71
+            console.log("downloadInnerHtmlAll: "+index+" is null");
72
+          }
71 73
         }
72 74
         elHtml += '</body><html>';
73 75
         var link = document.createElement('a');