fix strict errors
This commit is contained in:
@ -43,7 +43,7 @@ abstract class pdfdocumentsGeneric extends Base implements genericInterface
|
||||
const PDF_ORIENTATION_LANDSCAPE = 'L';
|
||||
|
||||
public string $filenameExtension = 'pdf';
|
||||
public string $filename;
|
||||
public ?string $filename = null;
|
||||
|
||||
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
|
||||
{
|
||||
// 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();
|
||||
|
||||
// sanitize filename
|
||||
|
@ -80,8 +80,8 @@ class invoicePdf extends pdfdocumentsOrder implements pdfdocumentsOrderinvoiceIn
|
||||
$filename = parent::getFilename();
|
||||
|
||||
$filename = str_replace(
|
||||
$this->getOrder()->getFieldData('oxordernr'),
|
||||
$this->getOrder()->getFieldData('oxbillnr'),
|
||||
(string) $this->getOrder()->getFieldData('oxordernr'),
|
||||
(string) $this->getOrder()->getFieldData('oxbillnr'),
|
||||
$filename
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user