File tree
Expand file treeCollapse file tree1 file changed
+2
-2
lines changed Expand file treeCollapse file tree1 file changed
+2
-2
lines changed Original file line number | Diff line number | Diff line change |
---|
@@ -117,11 +117,11 @@ public function dis($url)
|
117 | 117 | $action = $this->params['action'];
|
118 | 118 | $action = $this->convertToCamelCase($action);
|
119 | 119 |
|
120 |
| -if (is_callable([$controller_object, $action])) { |
| 120 | +if (preg_match('/action$/i', $action) == 0) { |
121 | 121 | $controller_object->$action();
|
122 | 122 |
|
123 | 123 | } else {
|
124 |
| -throw new \Exception("Method $action (in controller $controller) not found"); |
| 124 | +throw new \Exception("Method $action in controller $controller cannot be called directly - remove the Action suffix to call this method"); |
125 | 125 | }
|
126 | 126 | } else {
|
127 | 127 | throw new \Exception("Controller class $controller not found");
|
|
You can’t perform that action at this time.
0 commit comments