From 77c5277084bcc1dc2c243a821fbffab838aa32d6 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 21 Jun 2010 18:59:04 -0400 Subject: [PATCH] Make sure $objects is always an array --- content/lib/Objects/Manager.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); -- 2.11.0