Skip to content

Commit

Permalink
bug fix release
Browse files Browse the repository at this point in the history
- routes defined after dynamic routes giving undefined offset error (Bugfix)
  • Loading branch information
raghuveer committed Mar 29, 2022
1 parent cad210e commit eb4549c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions examples/routes/route-file1.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,19 @@
'with_middleware' => '',
'without_middleware' => ''
],
'admin-panel-pages-manage' => [
'route_value' => '/admin-panel/:routing_eng_var_2/pages/:routing_eng_var_4/manage',
'auth_check_requirements' => 'post-login',
'page_filename' => 'admin-panel-pages-add.php',
'redirect_to' => '',
'route_type' => 'backend-web-app',
'allowed_request_methods' => ['GET','POST'],
'controller_type' => 'procedural',
'controller_class_name' => \EaseAppPHP\EABlueprint\App\Http\Controllers\ProceduralController::class,
'method_name' => 'webHtmlOutput',
'with_middleware' => '',
'without_middleware' => ''
],

];
?>
2 changes: 1 addition & 1 deletion src/EARouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function matchRoute($routesArray, $uriPath, $queryStringArray, $receivedR

$this->specificRouteParamsCount = count($this->specificRouteParams);

if (stripos($routeArray['route_value'], ":routing_eng_var_") !== false) {
if (stripos($routeArray['route_value'], ":routing_eng_var_") === true) {

$this->specificRouteValueConstructed = array();

Expand Down

0 comments on commit eb4549c

Please sign in to comment.