? boost-619914.patch
Index: boost.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boost/boost.module,v
retrieving revision 1.3.2.2.2.5.2.213
diff -u -p -r1.3.2.2.2.5.2.213 boost.module
--- boost.module	30 Oct 2009 15:30:48 -0000	1.3.2.2.2.5.2.213
+++ boost.module	31 Oct 2009 23:11:55 -0000
@@ -479,7 +479,9 @@ function _boost_view_insert() {
       }
     }
   }
-  $flushed = boost_cache_expire_router($data);
+  if ($data) {
+    $flushed = boost_cache_expire_router($data);
+  }
   if (BOOST_VERBOSE >= 7) {
     watchdog('boost', 'Debug: _boost_view_insert() <br />!views Views Searched; !hits of them contain the new node and where thus flushed. As a result of this !flushed pages where expired from the boost cache.', array('!views' => $num_views, '!hits' => $num_hits, '!flushed' => $flushed));
   }
@@ -609,8 +611,12 @@ function boost_expire_node($node, $nid =
   }
 
   $flushed = 0;
-  $flushed += boost_cache_expire_router($data);
-  $flushed += boost_cache_expire_derivative($paths, TRUE);
+  if (!empty($data)) {
+    $flushed += boost_cache_expire_router($data);
+  }
+  if (!empty($paths)) {
+    $flushed += boost_cache_expire_derivative($paths, TRUE);
+  }
   if (BOOST_VERBOSE >= 7) {
     watchdog('boost', 'Debug: boost_expire_node() <br />Node !nid was flushed resulting in !flushed pages being expired from the cache',  array('!nid' => $node->nid, '!flushed' => $flushed));
   }
@@ -848,8 +854,12 @@ function boost_block_form_flush_submit(&
   }
   $data[] = array('base_dir' => BOOST_FILE_PATH, 'page_callback' => $form['values']['page_callback'], 'page_type' => $form['values']['page_type'], 'page_id' => $form['values']['page_id']);
   $flushed = 0;
-  $flushed += boost_cache_expire_router($data, TRUE);
-  $flushed += boost_cache_expire_derivative(array($form['values']['path']));
+  if ($data) {
+    $flushed += boost_cache_expire_router($data, TRUE);
+  }
+  if (isset($form['values']['path'])) {
+    $flushed += boost_cache_expire_derivative(array($form['values']['path']));
+  }
   if (BOOST_VERBOSE >= 7) {
     watchdog('boost', 'Debug: boost_block_form_flush_submit() <br />Page !path was deleted resulting in !flushed pages being expired from the cache',  array('!path' => $form['values']['path'], '!flushed' => $flushed));
   }
@@ -991,7 +1001,9 @@ function boost_block_db_rm_settings_form
     $data[] = array('base_dir' => BOOST_FILE_PATH, 'page_callback' => $router_item['page_callback']);
   }
 
-  $flushed = boost_cache_expire_router($data);
+  if ($data) {
+    $flushed = boost_cache_expire_router($data);
+  }
   if (BOOST_VERBOSE >= 7) {
     watchdog('boost', 'Debug: boost_block_db_rm_settings_form_submit() <br />!flushed pages being expired from the cache in order for the new settings to take effect.', array('!flushed' => $flushed));
   }
@@ -1408,7 +1420,11 @@ function boost_cache_delete($flush = FAL
  */
 function boost_cache_expire_derivative($paths, $both = FALSE) {
   global $base_path;
+  $expire = array();
 
+  if (empty($paths)) {
+    return FALSE;
+  }
   foreach ($paths as $path) {
     // Given path
     $expire[] = $path;
@@ -1437,6 +1453,9 @@ function boost_cache_expire_derivative($
   }
 
   $counter = 0;
+  if (empty($expire)) {
+    return FALSE;
+  }
   $expire = array_unique($expire);
   if (BOOST_NO_DATABASE ) {
     $counter += boost_cache_expire_by_filename($expire);
@@ -1459,6 +1478,10 @@ function boost_cache_expire_derivative($
  */
 function boost_cache_expire_by_db($paths) {
   $hashes = array();
+  if (empty($paths)) {
+    return FALSE;
+  }
+
   // Get all cache files directly associated with this path
   foreach ($paths as $path) {
     // With URL Variables
@@ -1508,6 +1531,9 @@ function boost_cache_expire_by_db($paths
  */
 function boost_cache_expire_by_filename($paths, $wildcard = TRUE) {
   $filenames = array();
+  if (empty($paths)) {
+    return FALSE;
+  }
 
   foreach ($paths as $path) {
     // Sanity check
@@ -2135,7 +2161,11 @@ function boost_set_db_page_settings($lif
       break;
   }
   boost_put_settings_db($lifetime, $push, $router_item, $scope);
-  return boost_cache_expire_router($data);
+  $count = 0;
+  if ($data) {
+    $count += boost_cache_expire_router($data);
+  }
+  return $count;
 }
 
 /**
