Skip to content

Commit 2f15927

Browse files
committed
refactor: Let Field::sf() return null by default when no value found
1 parent 3ee8fc6 commit 2f15927

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Fields/Field.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function toString($codes, $glue = ' ')
9191
* @param mixed $default
9292
* @return mixed
9393
*/
94-
public function sf($code, $default = '')
94+
public function sf($code, $default = null)
9595
{
9696
$subfield = $this->getSubfield($code);
9797
if (!$subfield) {

src/Fields/Isbn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Isbn extends Field implements FieldInterface
88
{
99
public function __toString()
1010
{
11-
return $this->sf('a');
11+
return $this->sf('a', '');
1212
}
1313

1414
public static function get(Record $record)

0 commit comments

Comments
 (0)