Skip to content

Commit f67255d

Browse files
committed
fix: Field bug introduced in 81e7f4d
1 parent 33c6fd9 commit f67255d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Fields/Field.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public static function makeFieldObject(Record $record, $tag, $pcre=false)
4444
public static function makeFieldObjects(Record $record, $tag, $pcre=false)
4545
{
4646
return array_map(function ($field) {
47-
return new self($field);
47+
48+
// Note: `new static()` is a way of creating a new instance of the
49+
// called class using late static binding.
50+
return new static($field);
4851
}, $record->getFields($tag, $pcre));
4952
}
5053
}

0 commit comments

Comments
 (0)