Issues

ZF-61: RewriteRouter does not correctly handle the default action

Issue Type: Bug Created: 2006-06-20T11:28:46.000+0000 Last Updated: 2007-07-05T14:44:28.000+0000 Status: Closed Fix version(s): - 0.1.4 (29/Jun/06)

Reporter: Jayson Minard (jayson) Assignee: Jayson Minard (jayson) Tags: - Zend_Controller

Related issues: Attachments:

Description

"If the foreach fails to locate a route then $controller, $action and $params will be unset and will throw errors."

It was introduced by commenting out a default route in the process of moving the class out of the proposals to the incubator. The simple fix is to add defaults for those variables just before the foreach loop:

$controller = 'index'; $action = 'noRoute';

And/or setting a sufficient default - like that one for instance:

$router->addRoute('default', ':controller/:action', array('action' => 'index'));

This way we'll make it compatible with current router.

Comments

No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts