Skip to content

Commit

Permalink
fixed a bug with multiple route verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
ikkez committed Mar 11, 2019
1 parent f861fa6 commit ce6a330
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
* compliance with the license. Any of the license terms and conditions
* can be waived if you get permission from the copyright holder.
*
* Copyright (c) 2017 ~ ikkez
* Copyright (c) 2019 ~ ikkez
* Christian Knuth <ikkez0n3@gmail.com>
*
* @version: 1.1.2
* @date: 23.04.2017
* @version: 1.1.3
* @date: 11.03.2019
*
**/

Expand All @@ -37,7 +37,8 @@ public function on($event,$pattern,$handler) {
$bak = $this->f3->ROUTES;
$this->f3->ROUTES=array();
$this->f3->route($pattern,$handler);
$this->routes[$event] = $this->f3->ROUTES;
$this->routes[$event] = (isset($this->routes[$event]))
? $this->f3->extend('ROUTES',$this->routes[$event]) : $this->f3->ROUTES;
$this->f3->ROUTES=$bak;
}

Expand Down

0 comments on commit ce6a330

Please sign in to comment.