fix strict errors

This commit is contained in:
2025-05-15 08:29:22 +02:00
parent 07621472c7
commit cd97bd5993
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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
); );