Download & Extend

check_plain called on arrays

Project:Case Tracker
Version:6.x-1.0-beta9
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

CT calls check_plain on arrays of task priorities, assignees, and statuses when cases are viewed, resulting in multitudes of the following error:
htmlspecialchars() expects parameter 1 to be string, array given in /var/www/drupal/atrium/includes/bootstrap.inc on line 860.

This is with a fresh install of Open Atrium.

Comments

#1

Also, this only appears when viewing some cases and not others. I haven't figured out a pattern yet.

#2

Status:active» postponed (maintainer needs more info)

Any chance you can tell me how to reproduce this?

#3

I've since moved away from Case Tracker, so I'm afraid I can't reproduce this. Feel free to close this if you'd like.

#4

Status:postponed (maintainer needs more info)» closed (cannot reproduce)

Setting to closed. Thanks for posting back here even though you have moved away from CT.

#5

Ran into this issue on an inherited OA codebase where both views and ctools had been installed in sites/all/modules, not sure if that's related. I've cleaned up system table as best I can.

The first element of the array being passed to check_plain is the string "Open a new case assigned to a particular project." and there is an empty string as a second element.

When clearing caches this array is also passed to mysql_real_escape_string() in line 321 of includes/database.mysql.inc.

#6

Turns out casetracker_basic was (strangely) enabled along with atrium_casetracker. Disabling casetracker_basic fixed the problem.

#7

Version:6.x-1.0-beta8» 6.x-1.0-beta9
Status:closed (cannot reproduce)» active

Even when disabling casetracker_basic this problem still occurs in our OA beta8 install. See also https://community.openatrium.com/issues/node/2560#comment-6324

#8

Confirmed.... still seeing problem with a clean OAb8 install without CT Basic enabled.

#9

Related? No project, create case + comment results in preg_match() error (htmlspecialchars() error in PHP 5.3.1)

#10

I'm seeing this error on a site without Case Tracker installed. "htmlspecialchars() expects parameter 1 to be string, array given in" ... "bootstrap.inc on line 860"

There log indicates the Location as: "http://example.com/admin/reports/status/run-cron?destination=admin%2Fbuild%2Fmodules"

Hope this additional information is useful.

#11

As far as I investigated there can be many reasons to receive this error.
Some modules can cause this error:

nobody click here