1
Vote

xmlTo NullReferenceException

description

It seems new FileZilla server installations do not have all expected xml nodes.
Your xmlTo function will throw a NullReferenceException when a xml node does not exists.

You should add a check for null.
var element = xdoc.XPathSelectElement(currentXPath+"[@"+nameTag+"=\"" + name + "\"]");

if (element == null)
  return default(T);

string value = element.Value;

comments

Katan87 wrote May 10, 2014 at 2:55 PM

Thanks for reporting this issue. It will be corrected soon.