Commit c2f0934ddeeab389df6600fce05c13bdeafbb51d

Authored by megan_w
1 parent 98a31d10

KTS-3387

"RSS fatal error: Cannont use string offset as an array in..."
Fixed. Checked that is is an array before looping.

Committed by: Megan Watson
Reviewed by: Conrad Vermeulen




git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.2c-Release-Branch@8523 c91229c3-7414-0410-bfa2-8a42b809f60b
plugins/rssplugin/loadFeed.inc.php
@@ -69,9 +69,9 @@ @@ -69,9 +69,9 @@
69 $aRSSArray = rss2array($feed); 69 $aRSSArray = rss2array($feed);
70 } 70 }
71 } 71 }
72 - if(count($aRSSArray[errors]) > 0){  
73 - for($i=0;$i<count($aRSSArray[errors]);$i++){  
74 - $response .= $aRSSArray[errors][$i].'<br>'; 72 + if(is_array($aRSSArray[errors])){
  73 + foreach ($aRSSArray[errors] as $errorItem){
  74 + $response .= $errorItem.'<br>';
75 echo '<br>'.$response.'<br>'; 75 echo '<br>'.$response.'<br>';
76 return; 76 return;
77 } 77 }