diff --git a/extra/html-extra/HtmlExtension.php b/extra/html-extra/HtmlExtension.php index ed740b47187..e2680cd6b92 100644 --- a/extra/html-extra/HtmlExtension.php +++ b/extra/html-extra/HtmlExtension.php @@ -71,7 +71,7 @@ public function dataUri(string $data, string $mime = null, array $parameters = [ $repr .= ';'.$key.'='.rawurlencode($value); } - if (0 === strpos($mime, 'text/')) { + if (str_starts_with($mime, 'text/')) { $repr .= ','.rawurlencode($data); } else { $repr .= ';base64,'.base64_encode($data); diff --git a/tests/IntegrationTest.php b/tests/IntegrationTest.php index aa24d5fbe8f..a4db042ed7b 100644 --- a/tests/IntegrationTest.php +++ b/tests/IntegrationTest.php @@ -265,7 +265,7 @@ public function br() public function is_multi_word($value) { - return false !== strpos($value, ' '); + return str_contains($value, ' '); } public function __call($method, $arguments)