Fixing code sniffer errors

This commit is contained in:
Larry E. Masters 2015-12-28 18:40:14 -05:00
parent 34b4261e6d
commit a02fb9e771
2 changed files with 5 additions and 5 deletions

View file

@ -217,7 +217,7 @@ class CakeSession {
* @return bool True if session has been started.
*/
public static function started() {
if (PHP_VERSION >=5.4) {
if (PHP_VERSION >= 5.4) {
return isset($_SESSION) && (session_status() === PHP_SESSION_ACTIVE);
}
return isset($_SESSION) && session_id();
@ -463,12 +463,12 @@ class CakeSession {
}
if (static::started()) {
if (session_id() && static::_hasSession()){
if (session_id() && static::_hasSession()) {
session_write_close();
session_start();
}
session_destroy();
if (isset($_COOKIE[static::_cookieName()])){
if (isset($_COOKIE[static::_cookieName()])) {
unset($_COOKIE[static::_cookieName()]);
}
}
@ -762,7 +762,7 @@ class CakeSession {
if (isset($_COOKIE[session_name()])) {
setcookie(Configure::read('Session.cookie'), '', time() - 42000, static::$path);
}
if (!headers_sent()){
if (!headers_sent()) {
session_write_close();
session_start();
session_regenerate_id(true);

View file

@ -53,7 +53,7 @@ class CacheSession implements CakeSessionHandlerInterface {
*/
public function read($id) {
$data = Cache::read($id, Configure::read('Session.handler.config'));
if (empty($data)){
if (empty($data)) {
return '';
}
return $data;