When installing the module, I'm getting these warnings. They also appear under admin/config/media/exif

* Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in check_plain() (line 1476 of /Users/alastair/Sites/serialphoto/includes/bootstrap.inc).
* Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in check_plain() (line 1476 of /Users/alastair/Sites/serialphoto/includes/bootstrap.inc).
* Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in check_plain() (line 1476 of /Users/alastair/Sites/serialphoto/includes/bootstrap.inc).
* Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in check_plain() (line 1476 of /Users/alastair/Sites/serialphoto/includes/bootstrap.inc).
* Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in check_plain() (line 1476 of /Users/alastair/Sites/serialphoto/includes/bootstrap.inc).
* Warning: htmlspecialchars() [function.htmlspecialchars]: Invalid multibyte sequence in argument in check_plain() (line 1476 of /Users/alastair/Sites/serialphoto/includes/bootstrap.inc).

Comments

yelvington’s picture

Verified. Clean Drupal 7 installation. Added Token and Pathauto with no problem. Added Exif and I get six of this error on every page.

jphautin’s picture

Assigned: Unassigned » jphautin
RoSk0’s picture

jphautin’s picture

Thanks for the linked issue RoSk0.

daoudicom’s picture

la solution et de remplacer
$form['.....'] = array(
.......
'#value' => *********,
......

par
$form['.....'] = array(
.......
'#default_value' => *********,
......

Womp’s picture

+1

jphautin’s picture

Status: Active » Needs review

warning was raised because of non UTF-8 formatting strings in image metadata field.
I am now ensuring the string is correctly formatted.
Please review future beta 5 or immediate dev version.

Womp’s picture

great patch! worked for me. I must note though, if you do not have the 'php-mbstring' package installed, you will have a PHP fatal error attempting to execute the mb_convert_encoding() function. I just ran 'yum install php-mbstring' and restarted apache and it fixed my PHP error.

jphautin’s picture

true. will add the module in the install requirement. Thanks for the update.

jphautin’s picture

Status: Needs review » Fixed
awm’s picture

Changed the encoding of bootstap.inc from ansi to utf8 and everything looks fine now. Let me know your ideas

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

davidwhthomas’s picture

This error popped up for me too, turns out it was some funky emdash hyphen type character in the node title.
I changed it to a normal hyphen and saved / displayed ok.

tecjam’s picture

I don't use the exif module, but also received this error when German Umlaute were used in the node Title. Not surte if it was present in d 7.14, but I upgraded to d 7.15 yesterday and since received this error.

This fixed it for me:

bootstrap.inc line 1572:

function check_plain($text) {
-  return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
+  return @htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
 }

Fix comes from here: http://drupal.org/node/393538#comment-5517454

Orkut Murat Yılmaz’s picture

@tecjam your solution fixed it for me too. Thanks:)

mwangi’s picture

This worked for me too

albertguedes’s picture

#14 fix to me.

I´m using drupal 7.23 and the error was in line 1565 on '/includes/bootstrap.inc'

Abbass’s picture

#14 worked for me too.

thanks!

jetwodru’s picture

I encountered the same after enabling Authcache, bug with Drupal Core or Authcache ?

https://drupal.org/node/2161095 Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() line 1565 of includes/bootstrap.inc

goldlilys’s picture

Issue summary: View changes

#14 worked for me with similar error, but not coming from Exif. It's the source of many other issues D7 was having regarding this error message and this one solved it all.

bmateus’s picture

I've just got this error today. #14 also worked for me.

In my case, error was not comming from Exif, as I don't have it installed. Seemed to be triggered from ImageTokens, or Metatags.

Still, it seems to be a problem of core. Thought this bug was already solved in Drupal core 7.33...
Seems it has been committed over 7 months ago.

barresoft’s picture

#14 works for me too, ty