Some more information. I think I found the place where the error gets triggered located in the query.php file. I get a "ERR :400 Invalid query!" message.
}else{
$q = explode(' ',$query);
if( preg_match('/\W/',$q[0]) or !preg_match('/^([=~<>&|]|LIKE)$/',$q[1]) ){
#if( preg_match('/\W/',$q[0]) {
echo "ERR :400 Invalid query!";
die;
}else{
if( $q[1] == '~' ) $q[1] = $dbregexp;
$query = " WHERE $q[0] $q[1] '".DbEscapeString($link,$q[2])."'";
}
}