Browse Source

Revert "Fix missing view variables."

Commit 7416c53 shows error message from last exception instead of first one
and also displays framework specific error messages instead of generic ones with debug off.
We don't want either.

This reverts commit 7416c530a205cce38f070d89a12f1434eab90cbf.
ADmad 14 years ago
parent
commit
9ce216b09d

+ 0 - 5
lib/Cake/Error/ExceptionRenderer.php

@@ -274,11 +274,6 @@ class ExceptionRenderer {
 				$this->_outputMessageSafe('error500');
 			}
 		} catch (Exception $e) {
-			$this->controller->set(array(
-				'error' => $e,
-				'name' => $e->getMessage(),
-				'code' => $e->getCode(),
-			));
 			$this->_outputMessageSafe('error500');
 		}
 	}

+ 2 - 2
lib/Cake/Test/Case/Error/ExceptionRendererTest.php

@@ -669,7 +669,7 @@ class ExceptionRendererTest extends CakeTestCase {
 			->with('missingHelper')
 			->will($this->throwException($exception));
 
-		$ExceptionRenderer->controller->expects($this->at(5))
+		$ExceptionRenderer->controller->expects($this->at(4))
 			->method('render')
 			->with('error500')
 			->will($this->returnValue(true));
@@ -701,7 +701,7 @@ class ExceptionRendererTest extends CakeTestCase {
 			->with('error400')
 			->will($this->throwException($exception));
 
-		$ExceptionRenderer->controller->expects($this->at(4))
+		$ExceptionRenderer->controller->expects($this->at(3))
 			->method('render')
 			->with('error500')
 			->will($this->returnValue(true));