Skip to content

Error getExtraDangerAsArray(): Return value must be of type array, null returned #251

@tobiasschaeferptb

Description

@tobiasschaeferptb

Hello,

When I click on Outdated Core in the Home view an error occurs:
getExtraDangerAsArray(): Return value must be of type array, null returned
My setup is TYPO3 13.4.22, t3monitoring 3.1.0, php 8.3.23.
When I change Classes/Domain/Model/Client.php (lines 418 - 424) from:

    public function getExtraDangerAsArray(): array
    {
        if (!empty($this->extraDanger)) {
            return json_decode($this->extraDanger, true);
        }
        return [];
    }

to:

    public function getExtraDangerAsArray(): array
    {
        if (!empty($this->extraDanger)) {
            $decoded = json_decode($this->extraDanger, true);
            if (is_array($decoded)) {
                return $decoded;
            }
        }
        return [];
    }

it works.

Greetings
Tobias

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions