diff --git a/advagg.module b/advagg.module
index 37adc9c..dd7603a 100644
--- a/advagg.module
+++ b/advagg.module
@@ -1716,6 +1716,11 @@ function advagg_process_css($css = NULL, $noagg = FALSE) {
       $good = TRUE;
 
       foreach ($preprocess_files as $preprocess_file => $extra) {
+        // Empty aggregate, skip
+        if (empty($preprocess_file)) {
+          continue;
+        }
+
         if ($extra !== FALSE && is_array($extra)) {
           $prefix = $extra['prefix'];
           $suffix = $extra['suffix'];
@@ -2011,6 +2016,11 @@ function advagg_process_js($master_set, $noagg = FALSE) {
       $preprocess_files = advagg_css_js_file_builder('js', $files);
       $good = TRUE;
       foreach ($preprocess_files as $preprocess_file => $extra) {
+        // Empty aggregate, skip
+        if (empty($preprocess_file)) {
+          continue;
+        }
+
         if ($extra !== FALSE && is_array($extra)) {
           $prefix = $extra['prefix'];
           $suffix = $extra['suffix'];
