diff --git a/src/DOMDocumentFactory.php b/src/DOMDocumentFactory.php index ddca1d5..9ab2a76 100644 --- a/src/DOMDocumentFactory.php +++ b/src/DOMDocumentFactory.php @@ -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"); }