Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Protect get() against missing records.

  • Loading branch information...
commit 73f348b29efea0100b24b31f637c77ceca44911c 1 parent d088a41
@bharat bharat authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 modules/exif/helpers/exif.php
View
4 modules/exif/helpers/exif.php
@@ -88,6 +88,10 @@ static function get($item) {
$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) {
Please sign in to comment.
Something went wrong with that request. Please try again.