Merge branch '1.6.x' into feat-create-function-abuse-fix

This commit is contained in:
Matej Bačo 2024-12-12 20:52:39 +01:00 committed by GitHub
commit 5a0369ce27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View file

@ -60,12 +60,13 @@ class Usage extends Action
}
$document = $payload['project'] ?? [];
$project = new Document($document);
if (empty($document)) {
if (empty($project->getAttribute('database'))) {
var_dump($payload);
return;
}
$project = new Document($document);
$projectId = $project->getInternalId();
foreach ($payload['reduce'] ?? [] as $document) {
if (empty($document)) {
@ -80,6 +81,7 @@ class Usage extends Action
);
}
$this->stats[$projectId]['project'] = [
'$id' => $project->getId(),
'$internalId' => $project->getInternalId(),

View file

@ -71,10 +71,6 @@ class UsageDump extends Action
$project = new Document($document);
if (empty($project->getAttribute('database'))) {
var_dump($stats);
}
/**
* End temp bug fallback
*/