From 28060d9dce3128cb0254d61a66d865fe8f4e1583 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 22 Sep 2009 14:25:52 -0700 Subject: Create a gallery error handler that traps php errors and rethrows them as Exceptions. This fixes ticket #763 --- modules/gallery/hooks/init_gallery.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/gallery/hooks') diff --git a/modules/gallery/hooks/init_gallery.php b/modules/gallery/hooks/init_gallery.php index 5735e7dc..da7eeb0f 100644 --- a/modules/gallery/hooks/init_gallery.php +++ b/modules/gallery/hooks/init_gallery.php @@ -32,6 +32,9 @@ Event::add("system.post_routing", array("url", "parse_url")); Event::add("system.post_routing", array("gallery", "maintenance_mode")); Event::add("system.shutdown", array("gallery", "shutdown")); +// @todo once we convert to Kohana 2.4 this doesn't have to be here +set_error_handler(array("gallery_error", "error_handler")); + // Override the cookie if we have a session id in the URL. // @todo This should probably be an event callback $input = Input::instance(); -- cgit v1.2.3