-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Return a Fluent instance for block config #46
Conversation
@damsfx @LukeTowers I am getting the following error after this PR has been merged: If I revert all is good. Odd thing to note, the error points to the "section" block in my theme even though it is actually defined in my plugin. |
The problem is here in renderPartial, array_merge() is expecting an array, not a Fluent object: https://github.com/wintercms/winter/blob/develop/modules/cms/classes/Controller.php#L1070 Update: actually, it's coming from further down the callstack in Twig\Template::display() which tries to yield the values from the array, eventually hit the Fluent object but expecting an array. |
@mjauvin I was also able to reproduce this bug ... If my page contains a “two-column” block. But also, as you, within my section block too ( I have made a I've forced the block config to be an array with: It may be a better solution than the Fluent type in the end. I'm really sorry for suggesting this non-answer solution. |
Yeah, I think it's better to force array in json_decode. |
@mjauvin @LukeTowers What's the best way to revert this commit to publish another one? |
@damsfx just make another PR with the reversion / desired proper fix in one |
@mjauvin @LukeTowers Done in #47 |
fix #23
Improve consistency between configuration data for blocks whose inspector has been opened or not.
with arrays
with objects
⚠ If a key is not present, a null value will be return (default behavior).