Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

accept-whitelist instead of accept_whitelist in config is causing error #209

Closed
Fatal-Errol opened this issue Jul 14, 2015 · 2 comments
Closed
Labels
Milestone

Comments

@Fatal-Errol
Copy link

I did a composer update and an error occured after that:

Fatal error: Uncaught exception 'Zend\Stdlib\Exception\BadMethodCallException' with message 'The option "accept-whitelist" does not have a callable "setAccept-whitelist" ("setaccept-whitelist") setter method which must be defined' in /var/www/engine/canarium-appmaster/forms/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 946
( ! ) Zend\Stdlib\Exception\BadMethodCallException: The option "accept-whitelist" does not have a callable "setAccept-whitelist" ("setaccept-whitelist") setter method which must be defined in /var/www/engine/canarium-appmaster/forms/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php on line 110

I checked the source and it seems that the accept-whitelist is causing it in config/admin.config.php. The zf-content-negotiation is expecting an underscore as a separator so changing it to accept_whitelist solves the problem.

Maybe a recent update on dependent packages is also causing this since it was working fine before the update.

Thanks

@weierophinney
Copy link
Member

zf-content-negotiation versions 1.0.9 and 1.1.1 now allow the dash-separated configuration keys. One thing to note: prior to the change that introduces the above exception, dash-separated keys were silently ignored. The patch in zf-content-negotiation now recognizes them. The appropriate fix is for this module to use correct keys, however.

@func0der
Copy link

@weierophinney they get overridden by each other though, so the problem still exists, no matter how they are seperated.

This needs a merge now.

@michalbundyra michalbundyra added this to the 2.1.1 milestone Jan 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants