The first Parameter of the constructor, the faultcode, of SoapFault must be a string. Otherwise it will lead to an error.
<?php
throw new SoapFault(1, "Error message!"); // wrong
throw new SoapFault("1", "Error message!"); // right
?>
(PHP 5, PHP 7, PHP 8)
SoapFault::__construct — Constructor de SoapFault
$faultcode
,$faultstring
,$faultactor
= ?,$detail
= ?,$faultname
= ?,$headerfault
= ?Esta funciĆ³n es un alias de: SoapFault::SoapFault()
The first Parameter of the constructor, the faultcode, of SoapFault must be a string. Otherwise it will lead to an error.
<?php
throw new SoapFault(1, "Error message!"); // wrong
throw new SoapFault("1", "Error message!"); // right
?>