Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(Fixes issue 1349)

  • Loading branch information...
commit e997353b7c60a8b52f7c517711f225c0b1859ad8 1 parent a5416a6
qiang.xue authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 framework/web/auth/CWebUser.php
7 framework/web/auth/CWebUser.php
View
@@ -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]);
}
Please sign in to comment.
Something went wrong with that request. Please try again.