6.0.0-alpha10
5/14/25

[#8125] Empty id causes missing url part when generating a url in routes
Summary Empty id causes missing url part when generating a url in routes
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Assigned
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester wrobel (at) horde (dot) org
Created 03/27/2009 (5892 days ago)
Due
Updated 10/10/2010 (5330 days ago)
Assigned 03/27/2009 (5892 days ago)
Resolved
Milestone
Patch No

History
10/10/2010 06:04:50 PM Chuck Hagenbuch Assigned to Chuck Hagenbuch
Taken from Mike Naberezny
 
03/27/2009 08:06:39 PM Chuck Hagenbuch Assigned to Mike Naberezny
State ⇒ Assigned
 
03/27/2009 08:02:08 PM Gunnar Wrobel Comment #2
New Attachment: empty_id_with_default.diff Download
Reply to this comment
Hit another thing the other way around when mapping urls. Empty ids 
cause selection of the default if one is given. If no default is 
present the mapping works fine. I just add the failing unit test for 
this.
03/27/2009 07:51:34 PM Gunnar Wrobel Comment #1
Priority ⇒ 1. Low
New Attachment: empty_id_with_no_default.diff Download
Patch ⇒ No
Milestone ⇒
Summary ⇒ Empty id causes missing url part when generating a url in routes
Type ⇒ Bug
State ⇒ Unconfirmed
Queue ⇒ Horde Framework Packages
Reply to this comment
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.

Saved Queries