Issue Bug Closed

#41641t3lib_db StripOrderBy, stripGroupBy fails if clause is misspelled or appears twice.

Laurent Cherpit 10/06/12, 18:10 updated 10/02/18, 12:16

Description

If ORDER BY or GROUP BY clauses are misspelled or appear twice in the given string. This fails.

Change the expression to be more tolerant and capable to clean, strip the related clauses efficiently.
It could allows to strip that kind of string:

ORDER BY name, tstamp DESC
ORDER BY  name, tstamp DESC
ORDERBY name, tstamp DESC
ORDER BY ORDER BY name, tstamp DESC
ORDERBY ORDER BY  name, tstamp DESC
ORDER BYORDERBY name, tstamp DESC
ORDERBYORDERBY name, tstamp DESC
ORDERBYORDERBYname, tstamp DESC
ORDERBYORDERBY ORDER BY name, tstamp DESC
etc..

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.