From abc8b7fa2712e6df0ea94aa3106b9b9030ce0260 Mon Sep 17 00:00:00 2001 From: Jakob Johansson Date: Sat, 7 Oct 2017 16:24:02 +0200 Subject: [PATCH] [5.5] Bail when array is provided as key in Session::flash (#21576) * throw InvalidArgumentException if flash key isn't a string * fix styling * Update Store.php --- src/Illuminate/Session/Store.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Session/Store.php b/src/Illuminate/Session/Store.php index be389558d383..0f4f20c9391e 100755 --- a/src/Illuminate/Session/Store.php +++ b/src/Illuminate/Session/Store.php @@ -337,7 +337,7 @@ public function decrement($key, $amount = 1) * @param mixed $value * @return void */ - public function flash($key, $value = true) + public function flash(string $key, $value = true) { $this->put($key, $value);