6.0.0-git
2018-12-15

[#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 2009-03-27 (3550 days ago)
Due
Updated 2010-10-10 (2988 days ago)
Assigned 2009-03-27 (3550 days ago)
Resolved
Milestone
Patch No

History
2010-10-10 18:04:50 Chuck Hagenbuch Assigned to Chuck Hagenbuch
Taken from Mike Naberezny
 
2009-03-27 20:06:39 Chuck Hagenbuch Assigned to Mike Naberezny
State ⇒ Assigned
 
2009-03-27 20:02:08 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.
2009-03-27 19:51:34 Gunnar Wrobel Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ Empty id causes missing url part when generating a url in routes
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
New Attachment: empty_id_with_no_default.diff Download
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