Closed (duplicate)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Strings
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2011 at 10:12 UTC
Updated:
21 Apr 2012 at 11:05 UTC
Jump to comment: Most recent file
Comments
Comment #1
finex commentedI've reproduced this bug too.
Comment #2
castawaybcn commentedSame here.
Comment #3
ehudash commentedI have the same issue.
It causes all my webforms to show English texts instead of the relevant language translation - looks like a major issue to me.
Thanks in advance.
UPDATE: the error come from check_plain($text) function in bootstrap.inc file, on line:
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
Hope this helps.
Comment #4
juliv commentedfixed: http://info4admins.com/warning-htmlspecialchars-expects-parameter-1-be-s...
Line 856 in bootstrap.inc:
Comment #5
pacufist commentedHm, why don`t we have type validation of $term in this part:
Comment #6
bartezz commented@Pacufist; you seem to be my life saver! I had the whole watchdog full of the htmlspecialchars() expects parameter 1 to be string error and couldn't find out why! Looks like your post was spot on!
Changed the code to:
And this seems to stop all the watchdog errors popping up! Not sure if this is the best solution but it works for now!
Cheers
PS. The fix mentioned by juliv is over the top... type validation in i18ntaxonomy.module is what we need I think!
Comment #7
tomsm commentedabout #6: Where do I need to change the code ?
OK, I have found the file: i18ntaxonomy.module.
Tested it: the error is gone. Thanks!
Comment #8
birdsarah commentedFix #4 worked great for me - thanks!
Comment #9
nogat commented#6 worked fine for me
thank you
Comment #10
christiaan_ commented#6 is a great solution. Thank you.
Comment #11
giorgosksolution from #6 works for me
here is a patch for it please test
Comment #13
bartezz commentedThanx for patch, works for me! Line endings set aside (always have trouble with these as well)
Comment #14
bartezz commentedSorry... wrong status!
Comment #15
daluxz commentedPatch works for me. Thanks!
Comment #16
vasrush commentedThis is working for me too.
Thanks
Comment #17
jose reyero commentedBesides the patch not passing automated tests, it doesn't fix the real bug, which is: why is i18nstring() returning a non string value?
Comment #18
bartezz commentedPatch not passing automated tests because of windows style line endings, always have trouble with those myself. Patch is good and although not completely fixing the cause (a returned array in stead of a returned string) it makes sure things do work...
Comment #19
jose reyero commented@Bartezz,
Ok but we are not 'hiding bugs'. We are trying to *fix* bugs here.
Comment #20
jose reyero commentedMaybe this is the solution we are looking for #1518348: Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain()