Skip to content
Permalink
Browse files

Fixing code sniffer errors

  • Loading branch information...
phpnut committed Dec 28, 2015
1 parent 34b4261 commit a02fb9e77141b0bfc25a26c45741842ad8cc9614
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/Cake/Model/Datasource/CakeSession.php
  2. +1 −1 lib/Cake/Model/Datasource/Session/CacheSession.php
@@ -217,7 +217,7 @@ public static function start() {
* @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 @@ public static function destroy() {
}
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 @@ public static function renew() {
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);
@@ -53,7 +53,7 @@ public function close() {
*/
public function read($id) {
$data = Cache::read($id, Configure::read('Session.handler.config'));
if (empty($data)){
if (empty($data)) {
return '';
}
return $data;

0 comments on commit a02fb9e

Please sign in to comment.
You can’t perform that action at this time.