[BUGFIX] Fixed method not allowed exception.

- Method request type are now checked on all classes in the RouterBase class.
This commit is contained in:
Simon Sessingø
2015-10-21 10:14:21 +02:00
parent a497c36ea4
commit 58e4eb85bb
6 changed files with 99 additions and 89 deletions
+2 -2
View File
@@ -19,9 +19,9 @@ class RouterGroup extends RouterEntry {
if($this->method) {
if(is_array($this->method)) {
$hasAccess = (in_array($request->getMethod(), $this->method));
$hasAccess = (in_array($request->getMethod(), $this->getRequestMethods()));
} else {
$hasAccess = strtolower($this->method) == strtolower($request->getMethod());
$hasAccess = strtolower($this->getRequestMethods()) == strtolower($request->getMethod());
}
}