From 73f348b29efea0100b24b31f637c77ceca44911c Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 May 2009 21:07:47 -0700 Subject: Protect get() against missing records. --- modules/exif/helpers/exif.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/exif/helpers') diff --git a/modules/exif/helpers/exif.php b/modules/exif/helpers/exif.php index c488bbd4..970be5ac 100644 --- a/modules/exif/helpers/exif.php +++ b/modules/exif/helpers/exif.php @@ -88,6 +88,10 @@ class exif_Core { $record = ORM::factory("exif_record") ->where("item_id", $item->id) ->find(); + if (!$record->loaded) { + return array(); + } + $definitions = self::_keys(); $keys = unserialize($record->data); foreach ($keys as $key => $value) { -- cgit v1.2.3