From 8fe8cdd4d99cd748577b1de58ceca22fa7cb7f60 Mon Sep 17 00:00:00 2001 From: Tobias Munk Date: Fri, 6 Dec 2024 07:10:17 +0100 Subject: [PATCH 1/2] reset useCookie value (#20287) * reset useCookie value see also https://github.com/yiisoft/yii2-docker/issues/174 * removed empty line --- tests/framework/web/session/SessionTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/framework/web/session/SessionTest.php b/tests/framework/web/session/SessionTest.php index 1270aa4afed..7dfe1f17d90 100644 --- a/tests/framework/web/session/SessionTest.php +++ b/tests/framework/web/session/SessionTest.php @@ -65,6 +65,7 @@ public function testParamsAfterSessionStart() $this->assertNotEquals($oldUseCookies, $newUseCookies); $this->assertFalse($newUseCookies); } + $session->setUseCookies($oldUseCookies); $oldGcProbability = $session->getGCProbability(); $session->setGCProbability(100); From 80f2545cf147abc731db3cd06961aa3530bb76ac Mon Sep 17 00:00:00 2001 From: Viktor Khokhryakov Date: Fri, 6 Dec 2024 10:11:14 +0400 Subject: [PATCH 2/2] Fixes CS (#20288) --- framework/db/BaseActiveRecord.php | 2 +- framework/db/mssql/Schema.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/framework/db/BaseActiveRecord.php b/framework/db/BaseActiveRecord.php index 10021e362cc..761bc2cb994 100644 --- a/framework/db/BaseActiveRecord.php +++ b/framework/db/BaseActiveRecord.php @@ -1783,7 +1783,7 @@ private function isValueDifferent($newValue, $oldValue) { if (is_array($newValue) && is_array($oldValue)) { // Only sort associative arrays - $sorter = function(&$array) { + $sorter = function (&$array) { if (ArrayHelper::isAssociative($array)) { ksort($array); } diff --git a/framework/db/mssql/Schema.php b/framework/db/mssql/Schema.php index 35908437f48..1b1fb267e51 100644 --- a/framework/db/mssql/Schema.php +++ b/framework/db/mssql/Schema.php @@ -823,5 +823,4 @@ public function createColumnSchemaBuilder($type, $length = null) { return Yii::createObject(ColumnSchemaBuilder::className(), [$type, $length, $this->db]); } - }