Преглед на файлове

Routing: Method needs to be uppercase

tags/v5.0.0alpha1
Bart Visscher преди 12 години
родител
ревизия
9d6a09f589
променени са 2 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 5
    5
      lib/route.php
  2. 1
    1
      lib/router.php

+ 5
- 5
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;
}


+ 1
- 1
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']);

Loading…
Отказ
Запис