From: Chuck Hagenbuch Date: Mon, 23 Feb 2009 02:11:10 +0000 (-0500) Subject: instead of dying, create a default mapper if one is otherwise unavailable X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=08797f09565115d32803d9ef993c74c3e2abd9ac;p=horde.git instead of dying, create a default mapper if one is otherwise unavailable --- 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) {