diff --git a/includes/query.inc b/includes/query.inc
index 086ab424..640dcd20 100644
--- a/includes/query.inc
+++ b/includes/query.inc
@@ -1071,6 +1071,10 @@ public function hasTag($tag) {
    * {@inheritdoc}
    */
   public function &getTags() {
+    // Tags can sometimes be NULL for old serialized query filter objects.
+    if (!isset($this->tags)) {
+      $this->tags = array();
+    }
     return $this->tags;
   }
 
