Browse Source

Remove unused argument.

ADmad 12 years ago
parent
commit
e79911b040

+ 3 - 4
src/Error/ExceptionRenderer.php

@@ -86,8 +86,8 @@ class ExceptionRenderer {
  * @param \Exception $exception Exception
  */
 	public function __construct(\Exception $exception) {
-		$this->controller = $this->_getController($exception);
 		$this->error = $exception;
+		$this->controller = $this->_getController();
 	}
 
 /**
@@ -96,10 +96,9 @@ class ExceptionRenderer {
  * This method returns the built in `ErrorController` normally, or if an error is repeated
  * a bare controller will be used.
  *
- * @param \Exception $exception The exception to get a controller for.
- * @return Controller
+ * @return \Cake\Controller\Controller
  */
-	protected function _getController($exception) {
+	protected function _getController() {
 		if (!$request = Router::getRequest(true)) {
 			$request = Request::createFromGlobals();
 		}

+ 4 - 1
tests/test_app/TestApp/Error/TestAppsExceptionRenderer.php

@@ -12,7 +12,10 @@ use TestApp\Controller\TestAppsErrorController;
 
 class TestAppsExceptionRenderer extends ExceptionRenderer {
 
-	protected function _getController($exception) {
+/**
+ * @inheritdoc
+ */
+	protected function _getController() {
 		if (!$request = Router::getRequest(true)) {
 			$request = new Request();
 		}