Closed (duplicate)
Project:
Drupal core
Version:
4.7.4
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2006 at 15:20 UTC
Updated:
15 Sep 2008 at 22:36 UTC
Function pager_query:
If the user, omits a $count_query argument and doesn't type the $query argument (sql string) for pager_query in upper case the $count_query will stay the same as $query.
Recommended fix:
File: pager.inc
Line: 65
Current line: $count_query = preg_replace(array('/SELECT.*?FROM /As', '/ORDER BY .*/'), array('SELECT COUNT(*) FROM ', ''), $query);
Recommended line: $count_query = preg_replace(array('/SELECT.*?FROM /iAs', '/ORDER BY .*/i'), array('SELECT COUNT(*) FROM ', ''), $query);
Note the "i" as a Pattern Modifier (after the last "/") on each regexp string.
Comments
Comment #1
KrisBuytaert commentedSeems like the bug is also stillin 5.X
http://drupal.org/node/115786
Comment #2
pasqualle