diff --git a/src/OaiPmh/RecordWriter.php b/src/OaiPmh/RecordWriter.php index 02018d8..d5c6376 100644 --- a/src/OaiPmh/RecordWriter.php +++ b/src/OaiPmh/RecordWriter.php @@ -212,7 +212,7 @@ public function write($records) // Save the current record, either as a deleted or as a regular file: $attribs = $record->header->attributes(); - if (strtolower($attribs['status']) == 'deleted') { + if (strtolower($attribs['status'] ?? '') == 'deleted') { $this->strategy->addDeletedRecord($id); } else { $recordXML = $this->recordFormatter->format($id, $record);