Headers failing by sending empty "user-agent"
The main issue in Headers::addHeaders
if (is_string($value)) {
$this->addHeaderLine($value);
But below in method addHeaderLine signature
public function addHeaderLine($headerFieldNameOrLine, $fieldValue = null)
{
$matches = null;
if (preg_match('/^(?P<name>[^()><@,;:\"\\/\[\]?=}{ \t]+):.*$/', $headerFieldNameOrLine, $matches)
&& $fieldValue === null) {
// is a header
$headerName = $matches['name'];
$headerKey = static::createKey($matches['name']);
$line = $headerFieldNameOrLine;
} elseif ($fieldValue === null) {
throw new Exception\InvalidArgumentException('A field name was provided without a field value');
}
Headers failing by sending empty "user-agent" The main issue in Headers::addHeaders
But below in method addHeaderLine signature
Witch is wrong typing NULL on string only fields