instead of dying, create a default mapper if one is otherwise unavailable
authorChuck Hagenbuch <chuck@horde.org>
Mon, 23 Feb 2009 02:11:10 +0000 (21:11 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Mon, 23 Feb 2009 02:11:10 +0000 (21:11 -0500)
framework/Controller/lib/Horde/Controller/Dispatcher.php

index 46249a4..e98225a 100644 (file)
@@ -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) {