diff --git a/src/FileSdIBase.php b/src/FileSdIBase.php index 92a4283..57650fc 100644 --- a/src/FileSdIBase.php +++ b/src/FileSdIBase.php @@ -35,7 +35,7 @@ public function __construct( \StdClass $parametersIn = null ) if (!property_exists($parametersIn, 'File')) { throw new \Exception("Cannot find property 'File'"); } - + $this->NomeFile = $parametersIn->NomeFile; $this->File = $parametersIn->File; $this->removeBOM(); @@ -52,7 +52,6 @@ public function import( $file ) if (false === is_readable($file)) { throw new \Exception("'$file' not found or not readable"); } - $this->NomeFile = basename($file); $this->File = file_get_contents($file); $this->removeBOM(); @@ -61,15 +60,10 @@ public function import( $file ) } /** - * Remove UTF-8 BOM - * - * Credits: https://forum.italia.it/u/Francesco_Biegi - * See https://forum.italia.it/t/risolto-notifica-di-scarto-content-is-not-allowed-in-prolog/5798/7 + * Do nothing */ public function removeBOM() { - $this->File = str_replace("\xEF\xBB\xBF", '', $this->File); - return $this; } } diff --git a/src/RispostaRiceviFatture.php b/src/RispostaRiceviFatture.php index d1f3a46..73a2904 100644 --- a/src/RispostaRiceviFatture.php +++ b/src/RispostaRiceviFatture.php @@ -24,6 +24,7 @@ class RispostaRiceviFatture { const ER01 = 'ER01'; + const ER00 = 'ER00'; public $Esito = self::ER01;