Skip to content

Commit

Permalink
[BUGFIX] Return PID as zero only when rootLevel is 1 (#76)
Browse files Browse the repository at this point in the history
A condition was missing a bracket, which led to the condition being interpreted with wrong precedence, resulting in PID being set to zero at the wrong time.
  • Loading branch information
mabolek authored Sep 21, 2022
1 parent c113f9a commit ba19bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/DataHandling/Operation/AbstractRecordOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ private function validateFieldNames(): void
*/
private function resolveStoragePid(): int
{
if ($GLOBALS['TCA'][$this->getTable()]['ctrl']['rootLevel'] ?? null === 1) {
if (($GLOBALS['TCA'][$this->getTable()]['ctrl']['rootLevel'] ?? null) === 1) {
return 0;
}

Expand Down

0 comments on commit ba19bfc

Please sign in to comment.