Permalink
Browse files

Merge branch '2.2' into 2.3

* 2.2:
  fixed typo
  bumped Symfony version to 2.2.5
  updated VERSION for 2.2.4
  update CONTRIBUTORS for 2.2.4
  updated CHANGELOG for 2.2.4
  Fixed NativeSessionStorage:regenerate when does not exists
  removed extraneous whitespaces

Conflicts:
	src/Symfony/Component/HttpKernel/Kernel.php
  • Loading branch information...
fabpot committed Jul 17, 2013
2 parents 1c8466e + 1224cdd commit db35524c1521b2ec0a12ec7d2933ffc3b68f95f4
Showing with 8 additions and 4 deletions.
  1. +1 −1 JsonResponse.php
  2. +7 −3 Session/Storage/NativeSessionStorage.php
View
@@ -89,7 +89,7 @@ public function setCallback($callback = null)
public function setData($data = array())
{
// Encode <, >, ', &, and " for RFC4627-compliant JSON, which may also be embedded into HTML.
- $this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT );
+ $this->data = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT);
return $this->update();
}
@@ -211,9 +211,13 @@ public function regenerate($destroy = false, $lifetime = null)
// workaround for https://bugs.php.net/bug.php?id=61470 as suggested by David Grudl
session_write_close();
- $backup = $_SESSION;
- session_start();
- $_SESSION = $backup;
+ if (isset($_SESSION)) {
+ $backup = $_SESSION;
+ session_start();
+ $_SESSION = $backup;
+ } else {
+ session_start();
+ }
return $ret;
}

0 comments on commit db35524

Please sign in to comment.