Skip to content

Commit

Permalink
Session: Fix query filtering sessions by date where double AND can ap…
Browse files Browse the repository at this point in the history
…pear (and cause an error)
  • Loading branch information
ywarnier committed Aug 17, 2020
1 parent c4cd72d commit 06ea06e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main/inc/lib/sessionmanager.lib.php
Expand Up @@ -3284,9 +3284,8 @@ public static function get_sessions_list(
foreach ($conditions as $field => $options) {
$operator = strtolower($options['operator']);
$value = Database::escape_string($options['value']);
$sql_query .= ' AND ';
if (in_array($field, $availableFields) && in_array($operator, $availableOperator)) {
$sql_query .= $field." $operator '".$value."'";
$sql_query .= ' AND '.$field." $operator '".$value."'";
}
}
}
Expand Down

0 comments on commit 06ea06e

Please sign in to comment.