From fc6e6c0640ef8ee2d2560f816c55e4a38bc3a49a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20M=C3=AD=C5=A1ek?= Date: Sun, 2 Jun 2024 12:59:15 +0200 Subject: [PATCH] nullref warning fixes --- src/Peachpie.Library.XmlDom/XmlWriter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Peachpie.Library.XmlDom/XmlWriter.cs b/src/Peachpie.Library.XmlDom/XmlWriter.cs index cf2127fbe2..84a4270c86 100644 --- a/src/Peachpie.Library.XmlDom/XmlWriter.cs +++ b/src/Peachpie.Library.XmlDom/XmlWriter.cs @@ -48,7 +48,7 @@ private enum State // There can be actually two levels, where the state of xmlwriter can be situated. You can move to DtdElement if you are in DTD and you can move to CDATA if you are in PI. Stack _state = new Stack(2); - static XmlWriterSettings DefaultSettings = new XmlWriterSettings() + static readonly XmlWriterSettings DefaultSettings = new XmlWriterSettings() { Encoding = new UTF8Encoding(false), // Disable BOM Indent = false, @@ -531,7 +531,7 @@ public bool startElement(string name) return false; } - return CheckedCall(() => _writer.WriteStartElement(name)); + return CheckedCall(() => _writer.WriteStartElement(name, "http://schemas.openxmlformats.org/package/2006/content-types")); } public bool startPi(string target)