-
Notifications
You must be signed in to change notification settings - Fork 25
Returning empty path with missing mandatory route param #30
Comments
I'd be in favor of throwing an exception in such an occurrence, and it'd probably be worth looking into how I can't think of a use case where I would want to ask for a URL to be generated and be OK with an empty string coming back if I didn't provide enough information for it to be assembled, so I might even consider this behavior a bug. What do you think, @weierophinney ? |
@michaelmoussa Looks like @xtreamwayz may have a fix; @Lansoweb, could you try his patch and see if it corrects the issue for you? |
Forgot to link to the patch: #32. |
@weierophinney A test is added for this issue. |
@weierophinney Sure. Will try it in a few. Thanks @xtreamwayz |
@weierophinney @xtreamwayz Worked perfectly! Even discovered other links with missed params in the project already :-) |
Hi!
Don't know if I misunderstood but i'm facing a problem with the url view helper.
I have the following route definition:
If, in a view, I create a link to it like:
it returns an empty string, and the button just refresh the page. In this line the $path is empty.
Shouldn't the helper maybe throw an exception if a mandatory parameter is missing? It not, how the best approach to prevent this?
I'm glad to provide a PR if an exception is necessary here.
Best Regards,
Leandro
The text was updated successfully, but these errors were encountered: