From: Michael J. Rubinsky Date: Mon, 21 Jun 2010 22:59:04 +0000 (-0400) Subject: Make sure $objects is always an array X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=77c5277084bcc1dc2c243a821fbffab838aa32d6;p=horde.git Make sure $objects is always an array --- diff --git a/content/lib/Objects/Manager.php b/content/lib/Objects/Manager.php index 8d6d63cb4..6d54dc527 100644 --- a/content/lib/Objects/Manager.php +++ b/content/lib/Objects/Manager.php @@ -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);