We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6fed416 + 3cad1ec commit 4dce03cCopy full SHA for 4dce03c
Controller/Component/TongueComponent.php
@@ -24,7 +24,7 @@ public function startup(Controller $controller) {
24
foreach ($params as $i => $param) {
25
26
$class = $param->getClass();
27
- // Class unspecified case
+ // Class unspecified case
28
if (is_null($class)) {
29
continue;
30
}
@@ -39,6 +39,9 @@ public function startup(Controller $controller) {
39
$value = null;
40
41
$type = new $className($value);
42
+ if (!($type instanceof TongueTypeInterface)) {
43
+ throw new LogicException($className . ' should be instance of TongueTypeInterface.');
44
+ }
45
$type->check();
46
$controller->request->params['pass'][$i] = $type;
47
@@ -51,4 +54,4 @@ public function startup(Controller $controller) {
51
54
));
52
55
53
56
-}
57
+}
0 commit comments