You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to migrate an old code to laravel and it's using SQL 'HAVING' clause. However if I try to compose via Query/Builder::having(Clousure) it throws an error:
TypeError
count(): Argument #1 ($value) must be of type Countable|array, null given
at vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php:2298
2294▕ * @return $this
2295▕ */
2296▕ public function addNestedHavingQuery($query, $boolean = 'and')
2297▕ {
➜ 2298▕ if (count($query->havings)) {
2299▕ $type = 'Nested';
2300▕
2301▕ $this->havings[] = compact('type', 'query', 'boolean');
2302▕
Laravel Version
10.48.11
PHP Version
8.2.17
Database Driver & Version
No response
Description
I am trying to migrate an old code to laravel and it's using SQL 'HAVING' clause. However if I try to compose via
Query/Builder::having(Clousure)
it throws an error:Steps To Reproduce
The text was updated successfully, but these errors were encountered: