From: Michael J. Rubinsky Date: Sat, 1 Jan 2011 20:36:04 +0000 (-0500) Subject: catch errors and send back false X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=57e4422b5ba4bfd1464aa7c8bb8725189018a0b8;p=horde.git catch errors and send back false --- diff --git a/ansel/lib/Ajax/Application.php b/ansel/lib/Ajax/Application.php index c07305530..7cd096ec6 100644 --- a/ansel/lib/Ajax/Application.php +++ b/ansel/lib/Ajax/Application.php @@ -45,7 +45,12 @@ class Ansel_Ajax_Application extends Horde_Core_Ajax_Application public function getGallery() { $id = $this->_vars->id; - return $GLOBALS['injector']->getInstance('Ansel_Storage')->getGallery($id)->toJson(true); + try { + return $GLOBALS['injector']->getInstance('Ansel_Storage')->getGallery($id)->toJson(true); + } catch (Exception $e) { + Horde::logMessage($e, 'ERR'); + return false; + } } - + }