Skip to content

Commit

Permalink
Use Null coalescing operator to fix phpunit warning
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Sep 3, 2024
1 parent 0e27f52 commit c76769a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DOMDocumentFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static function fromFile(string $file): DOMDocument
$xml = @file_get_contents($file);
if ($xml === false) {
$e = error_get_last();
$error = $e['message'] ?: "Check that the file exists and can be read.";
$error = $e['message'] ?? "Check that the file exists and can be read.";

throw new IOException("File '$file' was not loaded; $error");
}
Expand Down

0 comments on commit c76769a

Please sign in to comment.