We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 451b7c2 commit 1b53e00Copy full SHA for 1b53e00
src/Query/Builder.php
@@ -2107,16 +2107,12 @@ public function withSuffix(string $suffix): self
2107
2108
public function getLimit(): int
2109
{
2110
- return $this->getSetLimit();
+ return $this->getSetLimit() ?? $this->getDefaultLimit() ?? $this->connection->getDefaultLimit();
2111
}
2112
2113
- public function getSetLimit(): int
+ public function getSetLimit(): ?int
2114
2115
- // If a limit was explicitly set we use that over the defaults.
2116
- return $this->limit
2117
- ?? $this->options()->get('limit')
2118
- ?? $this->getDefaultLimit()
2119
- ?? $this->connection->getDefaultLimit();
+ return $this->options()->get('limit', $this->limit) ?? null;
2120
2121
2122
public function getDefaultLimit(): ?int
0 commit comments