diff --git a/app/View/Layouts/default.ctp b/app/View/Layouts/default.ctp
index fb4e9f36e..5815ead6e 100644
--- a/app/View/Layouts/default.ctp
+++ b/app/View/Layouts/default.ctp
@@ -42,7 +42,7 @@ $cakeVersion = __d('cake_dev', 'CakePHP %s', Configure::version())
- Session->flash(); ?>
+ Flash->render(); ?>
fetch('content'); ?>
diff --git a/lib/Cake/View/Elements/Flash/default.ctp b/lib/Cake/View/Elements/Flash/default.ctp
index bc1e2c369..3080c523a 100644
--- a/lib/Cake/View/Elements/Flash/default.ctp
+++ b/lib/Cake/View/Elements/Flash/default.ctp
@@ -4,4 +4,4 @@ if (!empty($params['class'])) {
$class .= ' ' . $params['class'];
}
?>
-= h($message) ?>
+= h($message) ?>
diff --git a/lib/Cake/View/Elements/Flash/error.ctp b/lib/Cake/View/Elements/Flash/error.ctp
old mode 100755
new mode 100644
index 6d6f27e6d..376456988
--- a/lib/Cake/View/Elements/Flash/error.ctp
+++ b/lib/Cake/View/Elements/Flash/error.ctp
@@ -1 +1 @@
-= h($message) ?>
+= h($message) ?>
diff --git a/lib/Cake/View/Elements/Flash/success.ctp b/lib/Cake/View/Elements/Flash/success.ctp
old mode 100755
new mode 100644
index 4a375e60f..13932bd70
--- a/lib/Cake/View/Elements/Flash/success.ctp
+++ b/lib/Cake/View/Elements/Flash/success.ctp
@@ -1 +1 @@
-= h($message) ?>
+= h($message) ?>
diff --git a/lib/Cake/View/Helper/FlashHelper.php b/lib/Cake/View/Helper/FlashHelper.php
index 46dc67ac4..058d19125 100644
--- a/lib/Cake/View/Helper/FlashHelper.php
+++ b/lib/Cake/View/Helper/FlashHelper.php
@@ -84,6 +84,7 @@ class FlashHelper extends AppHelper {
$flash = $options + $flash;
CakeSession::delete("Message.$key");
+ $flash['key'] = $key;
return $this->_View->element($flash['element'], $flash);
}