diff --git a/lib/middleware.php b/lib/middleware.php index fd262af..78b681f 100644 --- a/lib/middleware.php +++ b/lib/middleware.php @@ -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 * - * @version: 1.1.2 - * @date: 23.04.2017 + * @version: 1.1.3 + * @date: 11.03.2019 * **/ @@ -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; }