Skip to content

Commit

Permalink
Catch exceptions.
Browse files Browse the repository at this point in the history
Conflicts:
	kronolith/lib/Kronolith.php
  • Loading branch information
yunosh committed Nov 20, 2013
1 parent c323680 commit 57aca33
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions kronolith/templates/edit/edit.inc
Expand Up @@ -91,9 +91,15 @@ $hide_img = Horde::img('minus.png', _("Hide"), 'style="display:none"');
// We are editing/viewing resource calendars
foreach ($GLOBALS['display_resource_calendars'] as $cal) {
$rd = Kronolith::getDriver('Resource');
$rc = $rd->getResource($rd->getResourceIdByCalendar($cal));
printf('<option value="%s">%s (%s)</option>',
'resource_' . htmlspecialchars($cal), $rc->get('name'), _("resource")) . "\n";
try {
$rc = $rd->getResource($rd->getResourceIdByCalendar($cal));
printf('<option value="%s">%s (%s)</option>',
'resource_' . htmlspecialchars($cal),
htmlspecialchars($rc->get('name')),
_("resource"))
. "\n";
} catch (Horde_Exception_NotFound $e) {
}
}
}
?>
Expand Down

0 comments on commit 57aca33

Please sign in to comment.