mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Revert "Merge pull request #4405 from php-engineer/master-session-bugfix"
This reverts commit5863adda42
, reversing changes made to4c37cf6d4b
. There was no real issue. The lack of session cookie in CLI makes writing tests a bit tricky which caused the confusion. Refs #4405, #4451.
This commit is contained in:
parent
c26b381469
commit
d60cd3ab2f
2 changed files with 1 additions and 7 deletions
|
@ -267,7 +267,7 @@ class CakeSession {
|
||||||
* @return bool Success
|
* @return bool Success
|
||||||
*/
|
*/
|
||||||
public static function delete($name) {
|
public static function delete($name) {
|
||||||
if (self::start() && self::check($name)) {
|
if (self::check($name)) {
|
||||||
self::_overwrite($_SESSION, Hash::remove($_SESSION, $name));
|
self::_overwrite($_SESSION, Hash::remove($_SESSION, $name));
|
||||||
return !self::check($name);
|
return !self::check($name);
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,12 +365,6 @@ class CakeSessionTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testDelete() {
|
public function testDelete() {
|
||||||
$this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out'));
|
|
||||||
|
|
||||||
session_write_close();
|
|
||||||
$this->assertTrue(TestCakeSession::delete('Delete.me'));
|
|
||||||
$this->assertFalse(TestCakeSession::check('Delete.me'));
|
|
||||||
|
|
||||||
$this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out'));
|
$this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out'));
|
||||||
$this->assertTrue(TestCakeSession::delete('Delete.me'));
|
$this->assertTrue(TestCakeSession::delete('Delete.me'));
|
||||||
$this->assertFalse(TestCakeSession::check('Delete.me'));
|
$this->assertFalse(TestCakeSession::check('Delete.me'));
|
||||||
|
|
Loading…
Reference in a new issue