From 08797f09565115d32803d9ef993c74c3e2abd9ac Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Sun, 22 Feb 2009 21:11:10 -0500 Subject: [PATCH] instead of dying, create a default mapper if one is otherwise unavailable --- framework/Controller/lib/Horde/Controller/Dispatcher.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/Controller/lib/Horde/Controller/Dispatcher.php b/framework/Controller/lib/Horde/Controller/Dispatcher.php index 46249a444..e98225af4 100644 --- a/framework/Controller/lib/Horde/Controller/Dispatcher.php +++ b/framework/Controller/lib/Horde/Controller/Dispatcher.php @@ -62,7 +62,8 @@ class Horde_Controller_Dispatcher protected function __construct($context) { if (!isset($context['mapper']) || ! $context['mapper'] instanceof Horde_Routes_Mapper) { - throw new Horde_Controller_Exception('Mapper object missing from Dispatcher constructor'); + $context['mapper'] = new Horde_Routes_Mapper(); + $context['mapper']->connect('/:controller/:action/:id'); } foreach ($context as $key => $val) { -- 2.11.0