Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '2.1' into 2.2

Conflicts:
	lib/Cake/VERSION.txt
  • Loading branch information...
commit 4b8c4690041bf02a873e1e61abc580b9c37837d0 2 parents 907b322 + b27a3aa
@markstory markstory authored
View
3  lib/Cake/Model/Datasource/CakeSession.php
@@ -470,6 +470,9 @@ protected static function _configureSession() {
if (!empty($sessionConfig['handler'])) {
$sessionConfig['ini']['session.save_handler'] = 'user';
}
+ if (!isset($sessionConfig['ini']['session.gc_maxlifetime'])) {
+ $sessionConfig['ini']['session.gc_maxlifetime'] = $sessionConfig['timeout'] * 60;
+ }
if (empty($_SESSION)) {
if (!empty($sessionConfig['ini']) && is_array($sessionConfig['ini'])) {
View
2  lib/Cake/Network/CakeRequest.php
@@ -615,7 +615,7 @@ public function method() {
/**
* Get the host that the request was handled on.
*
- * @return void
+ * @return string
*/
public function host() {
return env('HTTP_HOST');
View
2  lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
@@ -737,6 +737,8 @@ public function testCookieTimeoutFallback() {
TestCakeSession::start();
$this->assertEquals(400, Configure::read('Session.cookieTimeout'));
$this->assertEquals(400, Configure::read('Session.timeout'));
+ $this->assertEquals(400 * 60, ini_get('session.cookie_lifetime'));
+ $this->assertEquals(400 * 60, ini_get('session.gc_maxlifetime'));
$_SESSION = null;
Configure::write('Session', array(
View
14 lib/Cake/Test/Case/Utility/SetTest.php
@@ -1615,6 +1615,20 @@ public function testClassicExtract() {
}
/**
+ * test classicExtract with keys that exceed 32bit max int.
+ *
+ * @return void
+ */
+ public function testClassicExtractMaxInt() {
+ $data = array(
+ 'Data' => array(
+ '13376924712' => 'abc'
+ )
+ );
+ $this->assertEquals('abc', Set::classicExtract($data, 'Data.13376924712'));
+ }
+
+/**
* testInsert method
*
* @see Hash tests, as Set::insert() is just a proxy.
View
4 lib/Cake/Utility/Set.php
@@ -561,8 +561,8 @@ public static function classicExtract($data, $path = null) {
foreach ($path as $i => $key) {
if (is_numeric($key) && intval($key) > 0 || $key === '0') {
- if (isset($data[intval($key)])) {
- $data = $data[intval($key)];
+ if (isset($data[$key])) {
+ $data = $data[$key];
} else {
return null;
}
Please sign in to comment.
Something went wrong with that request. Please try again.