From 69e74bbdd39201fad43216a0520d771a58554021 Mon Sep 17 00:00:00 2001 From: Jeremy Price Date: Wed, 30 Oct 2024 19:43:54 -0700 Subject: [PATCH] Fix ${var} deprecation warning in License model When upgrading to php8.3 i started getting deprecation warning about using ${var} instead of {$var} in 2 places in License.php PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/snipe-it/app/Models/License.php on line 187 PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/snipe-it/app/Models/License.php on line 219 This simple fix switches the offending statements to {$var} syntax. --- app/Models/License.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/License.php b/app/Models/License.php index 4923072f07..0997c1e57b 100755 --- a/app/Models/License.php +++ b/app/Models/License.php @@ -184,7 +184,7 @@ class License extends Depreciable $logAction->item_type = self::class; $logAction->item_id = $license->id; $logAction->created_by = auth()->id() ?: 1; // We don't have an id while running the importer from CLI. - $logAction->note = "deleted ${change} seats"; + $logAction->note = "deleted {$change} seats"; $logAction->target_id = null; $logAction->logaction('delete seats'); @@ -216,7 +216,7 @@ class License extends Depreciable $logAction->item_type = self::class; $logAction->item_id = $license->id; $logAction->created_by = auth()->id() ?: 1; // Importer. - $logAction->note = "added ${change} seats"; + $logAction->note = "added {$change} seats"; $logAction->target_id = null; $logAction->logaction('add seats'); } @@ -743,4 +743,4 @@ class License extends Depreciable { return $query->leftJoin('users as admin_sort', 'licenses.created_by', '=', 'admin_sort.id')->select('licenses.*')->orderBy('admin_sort.first_name', $order)->orderBy('admin_sort.last_name', $order); } -} \ No newline at end of file +}