diff --git a/common/framework/parsers/dbquery/Query.php b/common/framework/parsers/dbquery/Query.php index 705fe0762..381b4a9cb 100644 --- a/common/framework/parsers/dbquery/Query.php +++ b/common/framework/parsers/dbquery/Query.php @@ -620,7 +620,7 @@ class Query extends VariableBase } // Get the ordering (ASC or DESC). - if (preg_match('/^(ASC|DESC)$/i', $orderby->order_var, $matches)) + if (preg_match('/^(ASC|DESC)$/i', $orderby->order_var ?: '', $matches)) { $column_order = strtoupper($matches[1]); }