Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Various fixes for PHP 8.1 compatibility #358

Merged
merged 1 commit into from
Apr 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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