Add $replace argument to Header::send()

This commit is contained in:
Giuseppe Criscione 2018-09-21 16:56:05 +02:00
parent f9e5a264e3
commit 947c6294cd

View File

@ -76,12 +76,12 @@ class Header
}
}
public static function send($fieldName, $fieldValue)
public static function send($fieldName, $fieldValue, $replace = true)
{
if (headers_sent()) {
throw new RuntimeException('HTTP headers already sent');
}
header($fieldName . ': ' . trim($fieldValue));
header($fieldName . ': ' . trim($fieldValue), $replace);
}
public static function contentType($mimeType)