Skip to content

Commit

Permalink
Fix PHP 8.2 deprecation with ${var} in strings (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejunker authored Jan 31, 2023
1 parent b324160 commit f8109db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ApiV1/Traits/FormattingHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<a href="' . $url . '" target="_blank" rel="nofollow">' . "${input}</a>";
return '<a href="' . $url . '" target="_blank" rel="nofollow">' . "{$input}</a>";
},
sprintf(' %s', $tweet)
);
Expand Down

0 comments on commit f8109db

Please sign in to comment.