fix php 8.1 deprecations (#3648)

* show session maxlifetime in doctor
* rephrase compatibility in release notes
* bump version
This commit is contained in:
Kevin Papst
2022-11-24 13:12:18 +01:00
committed by GitHub
parent 2aa5eccc7c
commit 94a6b99c57
20 changed files with 125 additions and 57 deletions

View File

@@ -68,6 +68,9 @@ abstract class AbstractSpreadsheetRenderer extends AbstractRenderer
foreach ($row->getCellIterator() as $cell) {
$value = $cell->getValue();
$replacer = null;
if ($value === null) {
continue;
}
$firstReplacerPos = stripos($value, '${');
if ($firstReplacerPos === false) {
continue;
@@ -134,7 +137,7 @@ abstract class AbstractSpreadsheetRenderer extends AbstractRenderer
$cellCounter = 0;
foreach ($row->getCellIterator() as $cell) {
$value = $cell->getValue();
if (stripos($value, '${entry.') !== false) {
if ($value !== null && stripos($value, '${entry.') !== false) {
$startRow = $row->getRowIndex();
$worksheet->insertNewRowBefore($startRow + 1, $invoiceItemCount - 1);
break 2;

View File

@@ -11,6 +11,7 @@ namespace App\Invoice;
use App\Configuration\LanguageFormattings;
use App\Constants;
use App\Entity\Customer;
use App\Entity\Invoice;
use App\Entity\InvoiceDocument;
use App\Event\InvoiceCreatedEvent;
@@ -580,7 +581,22 @@ final class ServiceInvoice
}
uasort($customerEntries, function ($a, $b) {
return strcmp($a['customer']->getName(), $b['customer']->getName());
$customerA = $a['customer'] ?? null;
$customerB = $b['customer'] ?? null;
$nameA = ($customerA instanceof Customer) ? $customerA->getName() : null;
$nameB = ($customerB instanceof Customer) ? $customerB->getName() : null;
if ($nameA === null && $nameB === null) {
$result = 0;
} elseif ($nameA === null && $nameB !== null) {
$result = 1;
} elseif ($nameA !== null && $nameB === null) {
$result = -1;
} else {
$result = strcmp($nameA, $nameB);
}
return $result;
});
foreach ($customerEntries as $id => $settings) {