Skip to content

Commit 6cea5a8

Browse files
authored
Merge pull request #9 from vemaeg/feature/php-8.1-support
php 8.1 compat
2 parents 81a793f + 1fb5720 commit 6cea5a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/request/sfWebRequest.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function getContentType($trim = true)
192192
{
193193
$contentType = $this->getHttpHeader('Content-Type', null);
194194

195-
if ($trim && false !== $pos = strpos($contentType, ';'))
195+
if ($trim && false !== $pos = strpos($contentType !== null ? $contentType : '', ';'))
196196
{
197197
$contentType = substr($contentType, 0, $pos);
198198
}

0 commit comments

Comments
 (0)