Skip to content

PHP Fatal Error when API key not configured (php 8.x) #403

@anktd

Description

@anktd

Description

get_icons() crashes on PHP 8.x when no API key is configured.

Cause

getActiveCurrencies() returns ['error' => 'API Key is not set...'] when API key is empty. The foreach loop then iterates over this error array, attempting string offset access ($crypto['code'], $crypto['name']) on a string value.

Severity

  • PHP 8.x: Fatal TypeError (site crash)
  • PHP 7.x: Warnings only

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