Skip to content

Commit

Permalink
removendo @ e verificando indice do array antes de escrever nele
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Costa committed Apr 25, 2014
1 parent c491665 commit 4a07cb6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions libs/PdfNFePHP.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,18 @@ function __construct($orientation='P',$unit='mm',$format='A4') {
}
$this->Cset="0123456789";
for ($i=0; $i<96; $i++) { // convertendo grupos A & B
@$this->SetFrom["A"] .= chr($i);
@$this->SetFrom["B"] .= chr($i + 32);
@$this->SetTo["A"] .= chr(($i < 32) ? $i+64 : $i-32);
@$this->SetTo["B"] .= chr($i);
if (isset($this->SetFrom["A"])) {
$this->SetFrom["A"] .= chr($i);
}
if (isset($this->SetFrom["B"])) {
$this->SetFrom["B"] .= chr($i + 32);
}
if (isset($this->SetTo["A"])) {
$this->SetTo["A"] .= chr(($i < 32) ? $i+64 : $i-32);
}
if (isset($this->SetTo["A"])) {
$this->SetTo["B"] .= chr($i);
}
}
}//fim __construct

Expand Down

0 comments on commit 4a07cb6

Please sign in to comment.