Index: textlinkads.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/textlinkads/Attic/textlinkads.module,v
retrieving revision 1.1.4.5
diff -u -r1.1.4.5 textlinkads.module
--- textlinkads.module	18 Sep 2006 17:50:38 -0000	1.1.4.5
+++ textlinkads.module	20 Sep 2006 13:36:20 -0000
@@ -319,7 +319,7 @@
   $parser = new xml2array();
   if ($data = $parser->parseXMLintoarray($xml)) {
     // there are no links or just one link
-    if (count($data['LINKS']) > 0 && $data['LINKS']['LINK']['URL']) {
+    if (is_array($data['LINKS']) && $data['LINKS']['LINK']['URL']) {
       $links = array($data['LINKS']['LINK']);
     }
     else {
@@ -357,6 +357,7 @@
  * @return Array
  */
 function textlinkads_get_links($type = 'text') {
+  $links = array();
   $limit = ($type == 'text') ? variable_get('textlinkads_total', 4) : variable_get('feed_default_items', 10);
   $where = ($type == 'text') ? 'text IS NOT NULL && beforetext IS NOT NULL && aftertext IS NOT NULL' : 'rsstext IS NOT NULL';
   $result = db_query("SELECT * FROM {textlinkads}  WHERE $where LIMIT %d", $limit);
@@ -475,4 +476,4 @@
 
 __END__;
   return $js;
-}
\ No newline at end of file
+}
