From f1b14d6bb92e254809093560a8183d8f5335187b Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 23 Sep 2010 14:22:25 -0400 Subject: [PATCH] For javascript embedded renderers, don't return anything but valid, successfully rendered views. --- ansel/lib/Ajax/Imple/Embed.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ansel/lib/Ajax/Imple/Embed.php b/ansel/lib/Ajax/Imple/Embed.php index 5ec925861..f24d2c262 100644 --- a/ansel/lib/Ajax/Imple/Embed.php +++ b/ansel/lib/Ajax/Imple/Embed.php @@ -36,9 +36,12 @@ class Ansel_Ajax_Imple_Embed extends Horde_Core_Ajax_Imple if (!class_exists($class)) { throw new Horde_Exception(sprintf("Class definition for %s not found.", $class)); } - $view = new $class($args); - header('Content-Type: script/javascript'); - return $view->html(); + + try { + $view = new $class($args); + header('Content-Type: script/javascript'); + return $view->html(); + } catch (Exception $e) {} } } -- 2.11.0