From 0c230618ac402bab04bb6e7983e0f0b9c890f9a1 Mon Sep 17 00:00:00 2001 From: bleistivt Date: Wed, 15 Feb 2023 19:00:32 +0100 Subject: [PATCH] Fix type error in LegacyEmbedReplacer.php PHP8 is stricter about math operations on strings that can't be parsed to numbers --- library/Vanilla/EmbeddedContent/LegacyEmbedReplacer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Vanilla/EmbeddedContent/LegacyEmbedReplacer.php b/library/Vanilla/EmbeddedContent/LegacyEmbedReplacer.php index 758faeaebec..0febdecd995 100644 --- a/library/Vanilla/EmbeddedContent/LegacyEmbedReplacer.php +++ b/library/Vanilla/EmbeddedContent/LegacyEmbedReplacer.php @@ -121,7 +121,7 @@ public function replaceUrl(string $url) $seconds = $matches["seconds"] ?? false; $fullUrl = $videoId . "?autoplay=1"; if (!empty($minutes) || !empty($seconds)) { - $time = $minutes * 60 + $seconds; + $time = (int)$minutes * 60 + (int)$seconds; $fullUrl .= "&start=" . $time; }