Skip to content
Snippets Groups Projects
Commit 45fabec8 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

fix empty part; fix repo url

parent ca5f53c1
No related branches found
No related tags found
No related merge requests found
<?php <?php
/** /**
* *
* Axels first router * IML TINY ROUTER
* *
* --------------------------------------------------------------------------------<br> * --------------------------------------------------------------------------------<br>
* <br> * <br>
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
* SERVICING, REPAIR OR CORRECTION.<br> * SERVICING, REPAIR OR CORRECTION.<br>
* <br> * <br>
* --------------------------------------------------------------------------------<br> * --------------------------------------------------------------------------------<br>
* @version 1.1 * @version 1.2
* @author Axel Hahn * @author Axel Hahn
* @link https://github.com/iml-it/appmonitor * @link https://git-repo.iml.unibe.ch/iml-open-source/tinyrouter-php-class
* @license GPL * @license GPL
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL 3.0 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL 3.0
* @package - * @package -
...@@ -69,7 +69,7 @@ class tinyrouter{ ...@@ -69,7 +69,7 @@ class tinyrouter{
$bFoundRoute=false; $bFoundRoute=false;
foreach($aParts as $sPart){ foreach($aParts as $sPart){
// detect @varname or @varname:regex in a routing // detect @varname or @varname:regex in a routing
if($sPart[0]=="@"){ if(isset($sPart[0]) && $sPart[0]=="@"){
$sValue=$aReqParts[$iPart]; $sValue=$aReqParts[$iPart];
preg_match('/\@([a-z]*):(.*)/', $sPart, $match); preg_match('/\@([a-z]*):(.*)/', $sPart, $match);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment