From ce6a330db5f6a2970cf86331fe7ed9e86da0bdcd Mon Sep 17 00:00:00 2001 From: ikkez Date: Mon, 11 Mar 2019 09:52:14 +0100 Subject: [PATCH] fixed a bug with multiple route verbs --- lib/middleware.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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; }