I am reading a xml file with:
$reader = new XMLReader();
$reader->xml($myXml, NULL, LIBXML_NOWARNIG | LIBXML_NOERROR);
but in the same situation in any occasion show this warning on the line $reader->xml($myXml, NULL, LIBXML_NOWARNING, LIBXML_NOERROR);
warning: XMLReader::XML() [xmlreader.xml] Empty string supplied as input.
My question is, Why is showing the warning whether I have used the option LIBXML_NOWARNIG.
Thank you very much.
you are missing the N in WARNING.
Also, it should be
newnotnexand the method signature ofXMLReader::urliswhich means you should call it
However: both constants suppress parsing errors and passing an empty string to the method is not a parsing error but a logic error (you cannot parse an empty string) and thus, you cannot suppress it with them.