Skip to content

Commit 106ff47

Browse files
authored
Fix issue where orderBy strips spaces from fieldname
1 parent 158eec4 commit 106ff47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MysqliDb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ public function orderBy($orderByField, $orderbyDirection = "DESC", $customFields
10931093
{
10941094
$allowedDirection = Array("ASC", "DESC");
10951095
$orderbyDirection = strtoupper(trim($orderbyDirection));
1096-
$orderByField = preg_replace("/[^-a-z0-9\.\(\),_`\*\'\"]+/i", '', $orderByField);
1096+
$orderByField = preg_replace("/[^ -a-z0-9\.\(\),_`\*\'\"]+/i", '', $orderByField);
10971097

10981098
// Add table prefix to orderByField if needed.
10991099
//FIXME: We are adding prefix only if table is enclosed into `` to distinguish aliases

0 commit comments

Comments
 (0)