Skip to content
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions src/DbUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,10 @@ public function getEntitiesRestrictCriteria(
return [new QueryExpression('true')];
} elseif (isCommandLine() || Session::isCron()) {
$value = '0'; // If value is not set, fallback to root entity in cron / command line
} else {
// No active session and no privileged context: deny all access to prevent
// invalid SQL criterion (entities_id = '' on integer column → MySQL warning 1292).
return [new QueryExpression('false')];
}
}

Expand Down