Skip to content

Commit

Permalink
Fix #1608 about Phalcon\Mvc\Router\Annotations
Browse files Browse the repository at this point in the history
Make it possible to define default route with `@Route('/')` annotation
  • Loading branch information
baryshev committed Apr 13, 2014
1 parent 82960cb commit 5073d03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/mvc/router/annotations.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,11 @@ PHP_METHOD(Phalcon_Mvc_Router_Annotations, processActionAnnotation){
PHALCON_INIT_VAR(uri);
PHALCON_CONCAT_VV(uri, route_prefix, value);
} else {
PHALCON_CPY_WRT(uri, route_prefix);
if (Z_TYPE_P(route_prefix) != IS_NULL) {
PHALCON_CPY_WRT(uri, route_prefix);
} else {
PHALCON_CPY_WRT(uri, value);
}
}
} else {
PHALCON_INIT_NVAR(uri);
Expand Down

0 comments on commit 5073d03

Please sign in to comment.