From 764d2676dbe32c8c8f64d04b6051bb5e46397e24 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 31 Aug 2017 19:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9Bsession=E7=B1=BB=E7=9A=84pref?= =?UTF-8?q?ix=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Session.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/Session.php b/library/think/Session.php index 5fcc413c..1d02518e 100644 --- a/library/think/Session.php +++ b/library/think/Session.php @@ -25,6 +25,7 @@ class Session */ public static function prefix($prefix = '') { + empty(self::$init) && self::boot(); if (empty($prefix) && null !== $prefix) { return self::$prefix; } else { @@ -56,7 +57,7 @@ class Session $isDoStart = true; } - if (isset($config['prefix']) && (self::$prefix === '' || self::$prefix === null)) { + if (isset($config['prefix']) && ('' === self::$prefix || null === self::$prefix)) { self::$prefix = $config['prefix']; } if (isset($config['var_session_id']) && isset($_REQUEST[$config['var_session_id']])) {