8000 Don't pass null to strpos() · symfony/symfony@bf9dca3 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf9dca3

Browse files
committed
Don't pass null to strpos()
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent bc1b5be commit bf9dca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ public static function getMimeTypes(string $format)
13331333
public function getFormat(?string $mimeType)
13341334
{
13351335
$canonicalMimeType = null;
1336-
if (false !== $pos = strpos($mimeType, ';')) {
1336+
if ($mimeType && false !== $pos = strpos($mimeType, ';')) {
13371337
$canonicalMimeType = trim(substr($mimeType, 0, $pos));
13381338
}
13391339

0 commit comments

Comments
 (0)
0