From 478d60fbd4040886f5564e36beaf0ff3fad905c0 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 21 Jun 2010 19:01:31 -0400 Subject: [PATCH] throw exception if no object requested --- content/lib/Objects/Manager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/lib/Objects/Manager.php b/content/lib/Objects/Manager.php index 6d54dc527..e9add4c97 100644 --- a/content/lib/Objects/Manager.php +++ b/content/lib/Objects/Manager.php @@ -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; -- 2.11.0