Browse Source

PHP8なのに、str_containsで出来ない…

dev-master
parent
commit
8eea8d0879
  1. 2
      app/Http/Controllers/Home/Comment.php

2
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,

Loading…
Cancel
Save