Skip to content

Commit

Permalink
Merge pull request #358 from creative-commoners/pulls/1/p81fix
Browse files Browse the repository at this point in the history
ENH Various fixes for PHP 8.1 compatibility
  • Loading branch information
GuySartorelli authored Apr 13, 2022
2 parents 86ab749 + 4a182a9 commit eece7bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ protected function prepareMaxVersionSubSelect(SQLSelect $baseQuery, DataQuery $d
// We can ONLY promote a filter on the primary key of the base table. Any other conditions will make the
// version returned incorrect, as we are filtering out version that may be the latest (and correct) version
foreach ($baseQuery->getWhere() as $condition) {
if (is_object($condition)) {
continue;
}
$conditionClause = key($condition);
// Pull out the table and field for this condition. We'll skip anything we can't parse
if (preg_match('/^"([^"]+)"\."([^"]+)"/', $conditionClause, $matches) !== 1) {
Expand Down

0 comments on commit eece7bb

Please sign in to comment.