]> BookStack Code Mirror - bookstack/commitdiff
Caught old string helper function usage
authorDan Brown <redacted>
Sun, 26 Sep 2021 14:41:11 +0000 (15:41 +0100)
committerDan Brown <redacted>
Sun, 26 Sep 2021 14:41:11 +0000 (15:41 +0100)
Found by Laravel Shift Workbench

database/migrations/2016_04_20_192649_create_joint_permissions_table.php

index 5b43c7d549de1265fd5fee0eea91f4fd5b499ebd..31a7c5558990a14f753cbfcf3116b304601bce33 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use Illuminate\Support\Str;
 use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 
@@ -53,7 +54,7 @@ class CreateJointPermissionsTable extends Migration
 
         // Ensure unique name
         while (DB::table('roles')->where('name', '=', $publicRoleData['display_name'])->count() > 0) {
-            $publicRoleData['display_name'] = $publicRoleData['display_name'] . str_random(2);
+            $publicRoleData['display_name'] = $publicRoleData['display_name'] . Str::random(2);
         }
         $publicRoleId = DB::table('roles')->insertGetId($publicRoleData);