Permalink
Browse files

(Fixes issue 1349)

  • Loading branch information...
1 parent a5416a6 commit e997353b7c60a8b52f7c517711f225c0b1859ad8 qiang.xue committed Jun 30, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 framework/web/auth/CWebUser.php
@@ -580,13 +580,14 @@ public function clearStates()
public function getFlashes($delete=true)
{
$flashes=array();
+ $prefix=$this->getStateKeyPrefix().self::FLASH_KEY_PREFIX;
$keys=array_keys($_SESSION);
- $n=strlen(self::FLASH_KEY_PREFIX);
+ $n=strlen($prefix);
foreach($keys as $key)
{
- if(!strncmp($key,self::FLASH_KEY_PREFIX,$n))
+ if(!strncmp($key,$prefix,$n))
{
- $flashes[$key]=$_SESSION[$key];
+ $flashes[substr($key,$n)]=$_SESSION[$key];
if($delete)
unset($_SESSION[$key]);
}

0 comments on commit e997353

Please sign in to comment.