From f34afe346f9dba0f8925d5b8e08548839a16d89f Mon Sep 17 00:00:00 2001 From: Paul Pound Date: Thu, 31 May 2012 11:03:01 -0300 Subject: [PATCH] added check to make sure an object has a cmodel iin basic image --- islandora_basic_image/islandora_basic_image.module | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/islandora_basic_image/islandora_basic_image.module b/islandora_basic_image/islandora_basic_image.module index 31751da3..a980c44c 100644 --- a/islandora_basic_image/islandora_basic_image.module +++ b/islandora_basic_image/islandora_basic_image.module @@ -195,8 +195,14 @@ function islandora_basic_image_islandora_view_object($object, $user, $page_numbe function islandora_basic_image_islandora_ingest_post_ingest($object) { $cmodel_list = islandora_basic_image_islandora_get_types(); + if(!isset($cmodel_list)){ + return ; + } $models = $object->models; - foreach ($object->models as $model) { + if(!isset($models)){ + return ; + } + foreach ($models as $model) { if (isset($cmodel_list[$model])) { module_load_include('inc', 'islandora_basic_image', 'includes/image_process'); islandora_basic_image_create_all_derivatives($object);