mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-10 22:42:14 +00:00
[BUGFIX] Optimisations + bugfixes.
This commit is contained in:
@@ -64,7 +64,6 @@ class RouterRoute extends RouterEntry {
|
||||
* @return self
|
||||
*/
|
||||
public function setUrl($url) {
|
||||
|
||||
$parameters = array();
|
||||
$matches = array();
|
||||
|
||||
@@ -72,12 +71,12 @@ class RouterRoute extends RouterEntry {
|
||||
$parameters = $matches[1];
|
||||
}
|
||||
|
||||
$max = count($parameters);
|
||||
if($max) {
|
||||
for($i = 0; $i < $max; $i++) {
|
||||
$param = $parameters[$i];
|
||||
$this->parameters[$param] = '';
|
||||
if(count($parameters)) {
|
||||
$tmp = array();
|
||||
foreach($parameters as $param) {
|
||||
$tmp[$param] = '';
|
||||
}
|
||||
$this->parameters = $tmp;
|
||||
}
|
||||
|
||||
$this->url = $url;
|
||||
|
||||
Reference in New Issue
Block a user