diff -r 5c807fe77020 -r 68060328e9c6 includes/dbal.php --- a/includes/dbal.php Sun Jan 11 21:37:49 2009 -0500 +++ b/includes/dbal.php Wed Jan 14 20:33:05 2009 -0500 @@ -315,14 +315,17 @@ $ts = microtime_float(); // remove properly escaped quotes + $q = str_replace('\\\\', '', $q); $q = str_replace(array("\\\"", "\\'"), '', $q); // make sure quotes match foreach ( array("'", '"') as $quote ) { - if ( get_char_count($q, $quote) % 2 == 1 ) + $n_quotes = get_char_count($q, $quote); + if ( $n_quotes % 2 == 1 ) { // mismatched quotes + if ( $debug ) echo "Found mismatched quotes in query; parsed:\n$q\n"; return false; } // this quote is now confirmed to be matching; we can safely move all quoted strings out and replace with a token