Drupal 7 - Array to string conversion in DatabaseStatementBase I have an error on a Drupal 7 site that I cannot solve.

Notice: Array to string conversion in DatabaseStatementBase-&gt;execute() (line 2168 of ...


I cannot use dpm, can't find a way to debug, and can't see what is the data that causes the problem.

Anyone would know how I could debug this? really appreciated
Webchick's Quick-and-dirty debugging is so useful in this type of situation that I've sometimes had a projects with it as a ready to apply patch.

Find drupal_set_message()

function drupal_set_message($message = NULL, $type = 'status') {


in bootstrap.inc, and add

// DEBUG: Go track down that stinkin' error...
if ($type == 'error') {
  $message .= '&lt;pre&gt;'. print_r(debug_backtrace(), 1) .'&lt;/pre&gt;';
}
// END DEBUG


at the very top. This will give you a backtrace on the error, helping you to trace down it's source. It could be good to know that there are instances where this runs PHP out of memory, if you have a lot of errors, so you may need to add extra conditionals in there at times.