Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit 29822b1

Browse files
committed
Fix Default Routing
1 parent 40e4a05 commit 29822b1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Particle/Core/Request.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,14 @@ final private function loadClassAttributes($aMapping = false)
269269
$requestTemp = $this->request;
270270

271271
$requestExplode = explode('/', $requestTemp);
272-
273-
// The first position is empty. It is eliminated
274-
unset($requestExplode[0]);
272+
273+
if(empty($requestExplode[0])){
274+
// The first position is empty. It is eliminated
275+
unset($requestExplode[0]);
276+
}
275277

276278
$this->controller = strtolower(array_shift($requestExplode));
277-
279+
278280
$this->method = strtolower(array_shift($requestExplode));
279281
$this->args = Core\Security::filterAlphaNum($requestExplode);
280282
}

0 commit comments

Comments
 (0)