[Tickets #8125] Empty id causes missing url part when generating a url in routes

bugs at horde.org bugs at horde.org
Fri Mar 27 19:51:35 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8125
------------------------------------------------------------------------------
  Ticket             | 8125
  Created By         | Gunnar Wrobel <p at rdus.de>
  Summary            | Empty id causes missing url part when generating a url
                     | in routes
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
+New Attachment     | empty_id_with_no_default.diff
------------------------------------------------------------------------------


Gunnar Wrobel <p at rdus.de> (2009-03-27 15:51) wrote:

When using a route such as

  $m->connect(':controller/:action/:id', array('controller' =>  
'content', 'action' => 'view', 'id' => 'all'));

or

  $m->connect(':controller/:action/:id', array('controller' =>  
'content', 'action' => 'view'));

the call

$m->generate(array('controller' => 'content', 'action' => 'view', 'id' => 0))

returns an unexpected result.

I added a unit test and a potential fix. I think the fix improves  
things but it has an effect on the outcome of other unit tests. So I  
guess I better attach this as a patch.






More information about the bugs mailing list