throw exception if no object requested
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 21 Jun 2010 23:01:31 +0000 (19:01 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 21 Jun 2010 23:02:18 +0000 (19:02 -0400)
content/lib/Objects/Manager.php

index 6d54dc5..e9add4c 100644 (file)
@@ -61,6 +61,9 @@ class Content_Objects_Manager
         if (!is_array($objects)) {
             $objects = array($objects);
         }
+        if (!count($objects)) {
+            throw new InvalidArgumentException('No object requested');
+        }
         $params = $objects;
         $params[] = $type;