Index: potx.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/potx/Attic/potx.inc,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 potx.inc
--- potx.inc	27 Jun 2007 17:18:36 -0000	1.1.2.12
+++ potx.inc	27 Jun 2007 20:17:28 -0000
@@ -201,6 +201,11 @@ function _potx_build_files($string_mode 
   $strings  = $save_callback(NULL, NULL, 0, $string_mode);
   $versions = $version_callback();
 
+  // We might not have any string recorded in this string mode.
+  if (!is_array($strings)) {
+    return;
+  }
+
   foreach ($strings as $string => $file_info) {
     // Build a compact list of files this string occured in.
     $occured = $file_list = array();
@@ -823,10 +828,11 @@ function _potx_explore_dir($path = '', $
       $files = array_merge($files, _potx_explore_dir("$dir/", $basename));
     }
   }
-  // Skip the file of the CLI interface, because it contains
-  // test strings, we don't need on an automated run.
+  // Skip our own files, because we don't want to get strings from them 
+  // to appear in the output, especially with the command line interface.
+  // TODO: fix this to be able to autogenerate templates for potx itself.
   foreach ($files as $id => $file_name) {
-    if (preg_match('!potx-cli.php$!', $file_name)) {
+    if (preg_match('!(potx-cli.php|potx.inc)$!', $file_name)) {
       unset($files[$id]);
     }
   }
