Make sure $objects is always an array
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 21 Jun 2010 22:59:04 +0000 (18:59 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 21 Jun 2010 23:02:18 +0000 (19:02 -0400)
content/lib/Objects/Manager.php

index 8d6d63c..6d54dc5 100644 (file)
@@ -59,10 +59,9 @@ class Content_Objects_Manager
     {
         $type = current($this->_typeManager->ensureTypes($type));
         if (!is_array($objects)) {
-            $params = array($objects);
-        } else {
-            $params = $objects;
+            $objects = array($objects);
         }
+        $params = $objects;
         $params[] = $type;
 
         $ids = $this->_db->selectAssoc('SELECT object_id, object_name FROM ' . $this->_t('objects') . ' WHERE object_name IN (' . str_repeat('?,', count($objects) - 1) . '?)' . ' AND type_id = ?', $params);