Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 2309e65

Browse files
committed
Fixed normalizing headers in HeadersConstraint (#17)
1 parent b084898 commit 2309e65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PhpUnit/HeadersConstraint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private static function normalizeJsonSchema($schema)
122122
private static function normalizeHeaderValue(array $value, $type)
123123
{
124124
if ($type !== 'array') {
125-
$value = reset($value) ?: null;
125+
$value = empty($value) ? null : reset($value);
126126

127127
if (is_numeric($value)) {
128128
$value += 0;

0 commit comments

Comments
 (0)