[BUGFIX] Optimisations + bugfixes.

This commit is contained in:
Simon Sessingø
2015-12-10 04:12:44 +01:00
parent 3ba2cec8af
commit 59956d5fca
3 changed files with 11 additions and 9 deletions
+3 -2
View File
@@ -136,7 +136,7 @@ abstract class RouterEntry {
* @return mixed
*/
public function getParameters(){
return $this->parameters;
return ($this->parameters === null) ? array() : $this->parameters;
}
/**
@@ -254,7 +254,8 @@ abstract class RouterEntry {
$parameterRegex = $this->parametersRegex[$parameter];
}
for($i = 0; $i < strlen($route); $i++) {
$routeLength = strlen($route);
for($i = 0; $i < $routeLength; $i++) {
$character = $route[$i];