فهرست منبع

Merge pull request #3490 from shleeable/patch-25

Update LabsSettings.php - CookieJar::make() expects string, true given.
daniel 3 سال پیش
والد
کامیت
ecffbd294e
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      app/Http/Controllers/Settings/LabsSettings.php
  2. 1 1
      app/Http/Controllers/SettingsController.php

+ 2 - 2
app/Http/Controllers/Settings/LabsSettings.php

@@ -36,7 +36,7 @@ trait LabsSettings {
 		$cookie = Cookie::forget('dark-mode');
 		if($request->has('dark_mode')) {
 			if($request->dark_mode == 'on') {
-				$cookie = Cookie::make('dark-mode', true, 43800);
+				$cookie = Cookie::make('dark-mode', 'true', 43800);
 			} 
 		}
 
@@ -93,4 +93,4 @@ trait LabsSettings {
 			'royal'
 		];
 	}
-}
+}

+ 1 - 1
app/Http/Controllers/SettingsController.php

@@ -163,7 +163,7 @@ class SettingsController extends Controller
 		$mode = $request->input('mode');
 
 		if($mode == 'dark') {
-			$cookie = Cookie::make('dark-mode', true, 43800);
+			$cookie = Cookie::make('dark-mode', 'true', 43800);
 		} else {
 			$cookie = Cookie::forget('dark-mode');
 		}