Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1559 of mysite/includes/bootstrap.inc)

I got this error on the taxonomy field managing page. It appears after I enabled the taoxnomy translation mode (Translate. Different terms will be allowed for each language and they can be translated. )
I'm not sure the reason, but I'm using Entity tran slation as well.
DS is not used on that page

Comments

a.milkovsky’s picture

What is your current DS version?
There is issue for it https://drupal.org/node/1982646.
Try to apply this patch https://drupal.org/files/ds-htmlspecialchars-1982646-1.patch.
Or debug a little bootstrap.
You can add breakpoint here and watch user callstack at 1559 line:

 * @ingroup sanitization
 */
function check_plain($text) {
  if(!is_string($text) && !is_int($text)) {
    print '<pre>';
    print_r($text);
    print '</pre>';
  }
  return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
}

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Liam Morland’s picture

Component: translation_entity.module » ajax system
Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#3254699: [D7 PHP 8.1] check_plain(): Passing null to parameter #1 check_plain() includes/bootstrap.inc, line 1907
Liam Morland’s picture

Component: ajax system » bootstrap system