fix strict errors
This commit is contained in:
@ -43,7 +43,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
const PDF_ORIENTATION_LANDSCAPE = 'L';
|
const PDF_ORIENTATION_LANDSCAPE = 'L';
|
||||||
|
|
||||||
public string $filenameExtension = 'pdf';
|
public string $filenameExtension = 'pdf';
|
||||||
public string $filename;
|
public ?string $filename = null;
|
||||||
|
|
||||||
public function runPreAction()
|
public function runPreAction()
|
||||||
{
|
{
|
||||||
@ -262,12 +262,12 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets proper file name
|
* Gets a proper file name
|
||||||
*/
|
*/
|
||||||
public function makeValidFileName(string $filename): string
|
public function makeValidFileName(string $filename): string
|
||||||
{
|
{
|
||||||
// replace transliterations (umlauts, accents ...)
|
// replace transliterations (umlauts, accents ...)
|
||||||
$unicodeString = new UnicodeString(utf8_encode($filename));
|
$unicodeString = new UnicodeString(mb_convert_encoding($filename, 'UTF-8', 'ISO-8859-15'));
|
||||||
$filename = (string) $unicodeString->ascii();
|
$filename = (string) $unicodeString->ascii();
|
||||||
|
|
||||||
// sanitize filename
|
// sanitize filename
|
||||||
|
@ -80,8 +80,8 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
|
|||||||
$filename = parent::getFilename();
|
$filename = parent::getFilename();
|
||||||
|
|
||||||
$filename = str_replace(
|
$filename = str_replace(
|
||||||
$this->getOrder()->getFieldData('oxordernr'),
|
(string) $this->getOrder()->getFieldData('oxordernr'),
|
||||||
$this->getOrder()->getFieldData('oxbillnr'),
|
(string) $this->getOrder()->getFieldData('oxbillnr'),
|
||||||
$filename
|
$filename
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user