Commit 9b682972 authored by Robert Lyon's avatar Robert Lyon
Browse files

Make sure the 'COUNT(*)' is not quoted for get_field() (Bug #1406372)



Change-Id: Ib3006eb459c0f5ce72909f59c10517b3668c3e3d
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent e882c380
......@@ -51,7 +51,8 @@ function db_quote_identifier($identifier) {
// the sql standard "
$identifier = trim($identifier);
if (strpos($identifier, '"') !== false
|| $identifier === '*') {
|| $identifier === '*'
|| preg_match('/count\(/i', $identifier)) {
return $identifier;
}
return '"' . $identifier . '"';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment