setVars(), erasing previously set variables. Works great, but:https://github.com/phalcon/cphalcon/blob/master/phalcon/mvc/application.zep#L351
=> injects dispatcher's params, and erase previously set variables in controllers.
Url: /test-page/1234
$router->add('/test-page/{bar:[0-9]+}', ['controller' => 'MyController', 'action' => 'test']);
in MyController::testAction():
$this->view->setVar('bar', 'foo');
in test.volt:
{{ bar }}
Returns:
foo
Returns:
1234
Fixed in the latest stable version. Feel free to open a new issue if the problem appears again. Thank you for contributing, and for helping us make Phalcon better.
Most helpful comment
Fixed in the latest stable version. Feel free to open a new issue if the problem appears again. Thank you for contributing, and for helping us make Phalcon better.