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

Warning: htmlspecialchars() expects parameter 1 to be string, array given #195

Open
klas opened this issue May 10, 2016 · 2 comments
Open
Milestone

Comments

@klas
Copy link
Collaborator

klas commented May 10, 2016

When hidden variation is put on select dynamic in multiple mode the following appears, it also always happens in the list module (I presume hidden is forced here):

Warning: htmlspecialchars() expects parameter 1 to be string, array given in .../libraries/cms/cck/plugin/field.php on line 1116

as $value is array here we need to loop it..sth like http://hawkee.com/snippet/8641/

@klas
Copy link
Collaborator Author

klas commented Nov 6, 2016

still here, PR to fix this #301

@sebastienheraud sebastienheraud added this to the SEBLOD 3.11.0 milestone Nov 10, 2016
@klas
Copy link
Collaborator Author

klas commented May 10, 2017

With Seblod 3.10 I can't reproduce this error message, but hidden form is still rendered incorrectly:

<input id="select_dynamicin_multiple" name="select_dynamicin_multiple[]" value="6,7" class="inputbox" type="hidden">

As you can see array values are rendered as single string,

This should be the same as when form is rendered with default variation

<input id="select_dynamicin_multiple" name="select_dynamicin_multiple[]" value="6" class="inputbox" type="hidden"> 
<input id="select_dynamicin_multiple" name="select_dynamicin_multiple[]" value="7" class="inputbox" type="hidden"> 

My PR should resolve this, but it doesn't as value is converted to string somewhere upstream, before it reaches /libraries/cms/cck/plugin/field.php

@sebastienheraud sebastienheraud modified the milestones: SEBLOD 3.12.0, SEBLOD 3.11.0 May 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants