<?php

$router = new \Phalcon\Mvc\Router(false);

$router->add('/object/([A-Fa-f0-9]+|new)/:action', [
    'controller' => 'object',
    'id' => 1,
    'action' => 2,
]);

$router->add('/object/([A-Fa-f0-9])+', [
    'controller' => 'object',
    'action' => 'index',
    'id' => 1,
]);

$router->add('/auth/:action', [
    'controller' => 'auth',
    'action' => 1
]);

$router->add('/', [
    'controller' => 'index',
    'action' => 'index'
]);

$router->notFound([
    'controller' => 'index',
    'action' => 'error'
]);

return $router;
 
<?php

$router = new \Phalcon\Mvc\Router(false);

$router->add('/object/([0-9]+|new)/:action', [
    'controller' => 'object',
    'id' => 1,
    'action' => 2,
]);

$router->add('/object/([0-9]+)', [
    'controller' => 'object',
    'action' => 'index',
    'id' => 1,
]);

$router->add('/auth/:action', [
    'controller' => 'auth',
    'action' => 1
]);

$router->add('/', [
    'controller' => 'index',
    'action' => 'index'
]);

$router->notFound([
    'controller' => 'index',
    'action' => 'error'
]);

return $router;
 

Fix object ids with more than one digit being unviewable
Fix object ids with more than one digit being unviewable

Due to a regex error in the route for viewing objects, ids with more
than one digit would take the last digit in the id as the object to
view.
