From c3f7c3ea0a03ac77c4ae3d01da35eca958d1caec Mon Sep 17 00:00:00 2001
From: Marco Villegas <marvil07@gmail.com>
Date: Fri, 17 Dec 2010 13:55:29 -0500
Subject: [PATCH] Prevent empty values to be attached to the controller query.

This happens trying to load a condition like repository data = array().
---
 includes/controllers.inc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git includes/controllers.inc includes/controllers.inc
index 6d34670..5b253e8 100644
--- includes/controllers.inc
+++ includes/controllers.inc
@@ -224,7 +224,9 @@ abstract class VersioncontrolEntityController {
     // If provided, attach generic conditions.
     if ($conditions) {
       foreach ($conditions as $field => $value) {
-        $this->attachCondition($query, $field, $value);
+        if (!empty($value)) {
+          $this->attachCondition($query, $field, $value);
+        }
       }
     }
   }
-- 
1.7.2.3

