Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/FileSdIBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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;
}
}
1 change: 1 addition & 0 deletions src/RispostaRiceviFatture.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
class RispostaRiceviFatture
{
const ER01 = 'ER01';
const ER00 = 'ER00';

public $Esito = self::ER01;

Expand Down