mvc: array_first() is PHP 8.5

This commit is contained in:
Franco Fichtner 2026-02-11 14:06:51 +01:00
parent fcb6f76bd8
commit 07a5ec72f3

View file

@ -674,7 +674,7 @@ abstract class ApiMutableModelControllerBase extends ApiControllerBase
while (($line = fgetcsv($stream, null, $separator)) !== false) {
if (empty($heading)) {
$heading = $line;
} elseif (count($line) >= 1 && !is_null(array_first($line))) {
} elseif (count($line) >= 1 && !is_null($line[array_key_first($line)])) {
$record = [];
foreach ($line as $idx => $content) {
if (isset($heading[$idx])) {