From 8eea8d08793b025d196fce66b8193bcd6fdeb922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Thu, 14 Oct 2021 08:38:43 +0900 Subject: [PATCH] =?UTF-8?q?PHP8=E3=81=AA=E3=81=AE=E3=81=AB=E3=80=81str=5Fc?= =?UTF-8?q?ontains=E3=81=A7=E5=87=BA=E6=9D=A5=E3=81=AA=E3=81=84=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Home/Comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Home/Comment.php b/app/Http/Controllers/Home/Comment.php index bdd970b..a4af3dc 100644 --- a/app/Http/Controllers/Home/Comment.php +++ b/app/Http/Controllers/Home/Comment.php @@ -13,7 +13,7 @@ class Comment { $user = null; if (isset($_COOKIE['kero_token'])) $user = DB::table('users')->select('id')->where('kero_token', $_COOKIE['kero_token'])->first()->id; - if ($user == 0 && (str_contains($r->newmessage, 'http://') || str_contains($r->newmessage, 'https://'))) return redirect('/'); + if ($user == 0 && (strpos($r->newmessage, 'http://') !== false || strpos($r->newmessage, 'https://') !== false)) return redirect('/'); $add = DB::table('blg_comments')->insertGetId([ 'user_id' => $user,