diff --git a/.github/workflows/test-endroid.yml b/.github/workflows/test-endroid.yml index 939b360..53abc22 100644 --- a/.github/workflows/test-endroid.yml +++ b/.github/workflows/test-endroid.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - php-version: ['8.0', '8.1'] + php-version: ['8.1'] endroid-version: ["^4"] steps: diff --git a/lib/Providers/Qr/BaconQrCodeProvider.php b/lib/Providers/Qr/BaconQrCodeProvider.php index 529d887..4174e08 100644 --- a/lib/Providers/Qr/BaconQrCodeProvider.php +++ b/lib/Providers/Qr/BaconQrCodeProvider.php @@ -110,9 +110,9 @@ class BaconQrCodeProvider implements IQRCodeProvider * Ensure colour is an array of three values but also * accept a string and assume its a 3 or 6 character hex */ - private function handleColour(string $colour): string + private function handleColour(array|string $colour): array|string { - if ($colour[0] == '#') { + if (is_string($colour) && $colour[0] == '#') { $hexToRGB = function ($input) { // ensure input no longer has a # for more predictable division // PHP 8.1 does not like implicitly casting a float to an int