Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerPalette with config 'palette' => true fails #9

Closed
dsturm opened this issue Jul 1, 2020 · 2 comments
Closed

registerPalette with config 'palette' => true fails #9

dsturm opened this issue Jul 1, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@dsturm
Copy link

dsturm commented Jul 1, 2020

Hi,

since the config values are mapped into a collection,

[
      'palette' => true
]

will be mapped into

[
      'palette' => Illuminate\Support\Collection {
            #items: array:1 [
                  0 => true
            ]
      }
]

Therefor

(is_bool($palette = $this->config->get('palette')) && $palette === true) ||

cannot be true.

@Log1x
Copy link
Owner

Log1x commented Jul 1, 2020

Good catch! I'll push a fix later today or tonight after I finish the new ACF Composer release.

@dsturm
Copy link
Author

dsturm commented Jul 1, 2020

Thanks :-) First I thought to get the value by $this->config->get('palette')->first(), but this would break to be able to use a string as the palettes´ file name.

@Log1x Log1x added the bug Something isn't working label Jul 1, 2020
@Log1x Log1x closed this as completed in 96a7a1d Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants