diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-07-31 22:33:11 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-07-31 22:33:11 +0200 |
commit | 9d6a09f58946c8d4e7903d5b25a5fb00f6bcb5e8 (patch) | |
tree | 90ad9abd2da165cdbd4e5be719450bba0e594ad0 | |
parent | 28537037ae27a8e766d3c4ef129422dc02b45d5f (diff) | |
download | nextcloud-server-9d6a09f58946c8d4e7903d5b25a5fb00f6bcb5e8.tar.gz nextcloud-server-9d6a09f58946c8d4e7903d5b25a5fb00f6bcb5e8.zip |
Routing: Method needs to be uppercase
-rw-r--r-- | lib/route.php | 10 | ||||
-rw-r--r-- | lib/router.php | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/route.php b/lib/route.php index 0d3339add6c..df3a18e844f 100644 --- a/lib/route.php +++ b/lib/route.php @@ -10,27 +10,27 @@ use Symfony\Component\Routing\Route; class OC_Route extends Route { public function method($method) { - $this->setRequirement('_method', $method); + $this->setRequirement('_method', strtoupper($method)); return $this; } public function post() { - $this->method('post'); + $this->method('POST'); return $this; } public function get() { - $this->method('get'); + $this->method('GET'); return $this; } public function put() { - $this->method('put'); + $this->method('PUT'); return $this; } public function delete() { - $this->method('delete'); + $this->method('DELETE'); return $this; } diff --git a/lib/router.php b/lib/router.php index f76f64ac82b..c3864cfc91c 100644 --- a/lib/router.php +++ b/lib/router.php @@ -51,7 +51,7 @@ class OC_Router { if (isset($parameters['action'])) { $action = $parameters['action']; if (!is_callable($action)) { - var_dump($action); + var_dump($action); throw new Exception('not a callable action'); } unset($parameters['action']); |