atgp/factur-x

checkFacturxXsd returns true for wrong profiles if XML is valid

mahdiabderraouf opened this issue · 1 comments

Bug description

the method checkFacturxXsd returns true for any wrong profile if the given XML is valid.

How to reproduce ?

call the method checkFacturxXsd with a wrong profil and a valid XML.

$facturx = new Facturx();
$isXSDValid = $facturx->checkFacturxXsd($validXml, 'anywrongprofile');
echo (string) $isXSDValid; // "true"

Solution

Detect profil automaticly only if the given profil is "autodetect". A pull-request has been created for the give solution.

Pull request merged
Thanks