polyfills for php8's str_starts_with and str_ends_with

This commit is contained in:
Shish
2020-10-25 19:15:13 +00:00
parent 4ac9ab2ad6
commit c783ff0e8d
4 changed files with 21 additions and 18 deletions

View File

@@ -46,9 +46,9 @@ function contact_link(): ?string
}
if (
startsWith($text, "http:") ||
startsWith($text, "https:") ||
startsWith($text, "mailto:")
str_starts_with($text, "http:") ||
str_starts_with($text, "https:") ||
str_starts_with($text, "mailto:")
) {
return $text;
}