Skip to content
Permalink
Browse files

Fixing failing test caused by undefined variable.

  • Loading branch information...
markstory committed Jul 28, 2010
1 parent 5068d62 commit 6dbe5b09f8a69f5df2f7ba43af20ab91e334c205
Showing with 2 additions and 34 deletions.
  1. +2 −34 cake/libs/view/helpers/session.php
@@ -89,21 +89,17 @@ public function flash($key = 'flash') {
$flash = CakeSession::read('Message.' . $key);
if ($flash['element'] == 'default') {
$class = 'message';
if (!empty($flash['params']['class'])) {
$class = $flash['params']['class'];
} else {
$tmpVars = $flash['params'];
$tmpVars['message'] = $flash['message'];
$out = $this->_View->element($flash['element'], $tmpVars);
}
$out = '<div id="' . $key . 'Message" class="' . $class . '">' . $flash['message'] . '</div>';
} elseif ($flash['element'] == '' || $flash['element'] == null) {
$out = $flash['message'];
} else {
$view =& ClassRegistry::getObject('view');
$tmpVars = $flash['params'];
$tmpVars['message'] = $flash['message'];
$out = $view->element($flash['element'], $tmpVars);
$out = $this->_View->element($flash['element'], $tmpVars);
}
CakeSession::delete('Message.' . $key);
}
@@ -118,32 +114,4 @@ public function flash($key = 'flash') {
public function valid() {
return CakeSession::valid();
}
/**
* stub method to make helper less complainey
*
* @return void
*/
public function beforeRender() { }
/**
* stub method to make helper less complainey
*
* @return void
*/
public function beforeLayout() { }
/**
* stub method to make helper less complainey
*
* @return void
*/
public function afterRender() { }
/**
* stub method to make helper less complainey
*
* @return void
*/
public function afterLayout() { }
}

0 comments on commit 6dbe5b0

Please sign in to comment.
You can’t perform that action at this time.