mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Merge branch '2.1' into 2.2
Conflicts: lib/Cake/VERSION.txt
This commit is contained in:
commit
4b8c469004
5 changed files with 22 additions and 3 deletions
|
@ -470,6 +470,9 @@ class CakeSession {
|
|||
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'])) {
|
||||
|
|
|
@ -615,7 +615,7 @@ class CakeRequest implements ArrayAccess {
|
|||
/**
|
||||
* Get the host that the request was handled on.
|
||||
*
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function host() {
|
||||
return env('HTTP_HOST');
|
||||
|
|
|
@ -737,6 +737,8 @@ class CakeSessionTest extends CakeTestCase {
|
|||
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(
|
||||
|
|
|
@ -1614,6 +1614,20 @@ class SetTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
|
|
|
@ -561,8 +561,8 @@ class Set {
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue