From e2739b6974ce67c3f817a2027feaf1672300c220 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Mon, 10 Aug 2009 00:10:01 -0400 Subject: [PATCH] catch errors --- ansel/lib/View/Gallery.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansel/lib/View/Gallery.php b/ansel/lib/View/Gallery.php index 0b0ef844b..c798af8e6 100644 --- a/ansel/lib/View/Gallery.php +++ b/ansel/lib/View/Gallery.php @@ -81,6 +81,9 @@ class Ansel_View_Gallery extends Ansel_View_Base } else { $this->gallery = $this->getGallery(); } + if (is_a($this->gallery, 'PEAR_Error')) { + throw new Horde_Exception($this->gallery); + } // Check user age if (!$this->gallery->isOldEnough()) { -- 2.11.0