From af3fa9d280df3caba191b9ed986941303db471ef Mon Sep 17 00:00:00 2001 From: Eric Junker Date: Tue, 31 Jan 2023 09:13:32 -0600 Subject: [PATCH] Fix PHP 8.2 deprecation with ${var} in strings Using ${var} in strings is deprecated, use {$var} instead --- src/ApiV1/Traits/FormattingHelpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ApiV1/Traits/FormattingHelpers.php b/src/ApiV1/Traits/FormattingHelpers.php index f90a57c..45d66a1 100644 --- a/src/ApiV1/Traits/FormattingHelpers.php +++ b/src/ApiV1/Traits/FormattingHelpers.php @@ -41,9 +41,9 @@ public function linkify( '#' . $patterns['url'] . '#i', static function ($matches) { $input = $matches[0]; - $url = preg_match('!^https?://!i', $input) ? $input : "http://${input}"; + $url = preg_match('!^https?://!i', $input) ? $input : "http://{$input}"; - return '' . "${input}"; + return '' . "{$input}"; }, sprintf(' %s', $tweet) );