Use an array_key_exists() call here instead of empty() to support searching for empty...
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 8 Mar 2010 22:07:27 +0000 (17:07 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 8 Mar 2010 22:07:27 +0000 (17:07 -0500)
System shares will have null owners so tags on system shares will have an empty tag user.

content/lib/Tagger.php

index cb5fc07..e4c3f07 100644 (file)
@@ -393,7 +393,7 @@ class Content_Tagger
                 $sql .= ' AND objects.type_id IN (' . implode(', ', $args['typeId']) . ')';
             }
 
-            if (!empty($args['userId'])) {
+            if (array_key_exists('userId', $args)) {
                 $args['userId'] = $this->_userManager->ensureUsers($args['userId']);
                 $sql .= ' AND tagged.user_id IN ( ' . implode(', ', $args['userId']) . ')';
             }