Merge pull request #79 from skipperbent/development

[BUGFIX] Bugfixes and optimisations
This commit is contained in:
Simon Sessingø
2016-04-07 23:21:13 +02:00
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -135,6 +135,14 @@ class RouterBase {
$routeNotAllowed = false;
// Make sure routes with longer urls are rendered first
usort($this->controllerUrlMap, function($a, $b) {
if(strlen($a->getUrl()) < strlen($b->getUrl())) {
return 1;
}
return -1;
});
$max = count($this->controllerUrlMap);
/* @var $route RouterEntry */
+1 -1
View File
@@ -93,7 +93,7 @@ class RouterGroup extends RouterEntry {
* @return self
*/
public function addSettings(array $settings = null) {
if(isset($settings['namespace'])) {
if($this->getNamespace() !== null && isset($settings['namespace'])) {
unset($settings['namespace']);
}
if(is_array($settings)) {