Skip to content

[3.1] White labelling error when using multiple logo's and env variables #3394

@robdekort

Description

@robdekort

Bug Description

When using multiple custom logo URL's this doesn't work:

'custom_logo_url' => [
    'nav' => env('STATAMIC_CUSTOM_LOGO_NAV_URL', null),
    'outside' => env('STATAMIC_CUSTOM_LOGO_OUTSIDE_URL', null)
]

Gives an error:

ErrorException
htmlspecialchars() expects parameter 1 to be string, array given (View: /Users/robdekort/Sites/anne-meithe/vendor/statamic/cms/resources/views/partials/global-header.blade.php)

It wil work when you set the logo's to empty strings, but then the CP doesn't fallback to the default logo's.

Screenshot 2021-03-18 at 15 55 04

How to Reproduce

Try to use .env variables for setting the nav and outside logo in config/statamic/cp.php like above.

Extra Detail

Screenshot 2021-03-18 at 15 52 11

Environment

Statamic 3.1.0-beta.1 Pro
Laravel 8.33.1
PHP 7.4.13
No addons installed

Install method (choose one):

  • Starter kit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions