Skip to content

Commit

Permalink
nullref warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Jun 2, 2024
1 parent 7ea7715 commit fc6e6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Peachpie.Library.XmlDom/XmlWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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> _state = new Stack<State>(2);

static XmlWriterSettings DefaultSettings = new XmlWriterSettings()
static readonly XmlWriterSettings DefaultSettings = new XmlWriterSettings()
{
Encoding = new UTF8Encoding(false), // Disable BOM
Indent = false,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fc6e6c0

Please sign in to comment.