Skip to content

Commit e2c4899

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)