aaa
This commit is contained in:
@@ -72,7 +72,9 @@ abstract class Smarty_Internal_CompileBase {
|
||||
}
|
||||
// named attribute
|
||||
} else {
|
||||
$kv = each($mixed);
|
||||
// Replace deprecated each() with key()/current() for PHP 7.2+ compatibility
|
||||
reset($mixed);
|
||||
$kv = array('key' => key($mixed), 'value' => current($mixed));
|
||||
// option flag?
|
||||
if (in_array($kv['key'], $this->option_flags)) {
|
||||
if (is_bool($kv['value'])) {
|
||||
|
||||
@@ -231,8 +231,11 @@ class Zeed_Session
|
||||
$userOptionName = strtolower($userOptionName);
|
||||
|
||||
// set the ini based values
|
||||
// 如果session已经启动,跳过ini_set以避免警告
|
||||
if (array_key_exists($userOptionName, self::$_defaultOptions)) {
|
||||
ini_set("session.$userOptionName", $userOptionValue);
|
||||
if (!self::$_sessionStarted && session_status() !== PHP_SESSION_ACTIVE) {
|
||||
@ini_set("session.$userOptionName", $userOptionValue);
|
||||
}
|
||||
} elseif (isset(self::$_localOptions[$userOptionName])) {
|
||||
self::${self::$_localOptions[$userOptionName]} = $userOptionValue;
|
||||
}
|
||||
@@ -300,14 +303,14 @@ class Zeed_Session
|
||||
if ($removeCookie) {
|
||||
self::expireSessionCookie();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除SESSION
|
||||
*/
|
||||
public static function unsetSession ($session_name)
|
||||
{
|
||||
unset($_SESSION[$session_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 清除SESSION
|
||||
*/
|
||||
public static function unsetSession ($session_name)
|
||||
{
|
||||
unset($_SESSION[$session_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user