Panel custom favicon error?

I just read that 3.6. allows to bring your own favicons to the panel, yeah.
So i tried in my freshly updated Kirby
Unfortunately the simple implementation

'panel' => [
    'favicon' => 'assets/favicon.ico'

throws an error.

Invalid argument supplied for foreach()

in …/kirby/views/panel.php line 34

When i try the more enhanced mode with all the formats in extra arrays it works nicely:

'panel' => [
    'favicon' => [
      'apple-touch-icon' => [
        'type' => 'image/png',
        'url'  =>  'assets/apple-touch-icon.png',
      'shortcut icon' => [
        'type' => 'image/svg+xml',
        'url'  => 'assets/favicon.svg',

Not sure if i found a bug, but i guess …

Cheers and thanks for 3.6 :partying_face:

Good question if this is a bug in the code, or the documentation is simply wrong.

The code on line 34 definitely expects an array, and the fallback value for the Panel option in kirby\src\Panel\Document.php#64 is also the long version array, which is also expected in the tests.

1 Like

I created an issue and this will be fixed in 3.6.2.

1 Like