-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined property: Illuminate\\Database\\Eloquent\\Relations\\HasMany::$orWhere #50172
Comments
This is caused by #50124 we already pinned v10.44 due to massive failures. |
added a PR with a currently failing test that passes with v10.44 and below #50176 |
The same issue also |
Not sure if exactly related, but I'm also having an issue caused by #50124 in a Laravel Nova project. Being more specific, the trait
The
This one is a custom filter we have. It is defined using Nova 3 way of creating filters, and although our project is currently using Nova 4, it worked just fine until Laravel 10.45. Again, removing the trait I'm probably opening a new issue for this if it doesn't get fixed in 10.46, but until that, I'll at least add these details. |
Laravel Version
10.45.0
PHP Version
8.3.3
Database Driver & Version
mysql
Description
Hi,
I upgrade each week to the latest Laravel. When I upgraded today from 10.44.0 to 10.45.0 and I am now getting this stack trace.
2024-02-20 21:29:08] web.ERROR: Undefined property: Illuminate\Database\Eloquent\Relations\HasMany::$orWhere {"exception":"[object] (ErrorException(code: 0): Undefined property: Illuminate\Database\Eloquent\Relations\HasMany::$orWhere at
The Line in my code looks like this:
->when(!$series, function ($query) {
$query->notSeries()->orWhere->book()->orWhere->speaker();
})
This has worked for a long time (years) and stopped today.
I looked through the fixes that went into 10.45.0 and can't seem to determine what might have caused it.
I just reverted back to 10.44.0 and it's working again so I am sure it's in 10.45.0.
Thanks!
Steps To Reproduce
n/a (not sure how to reproduce short of the code I wrote above)
The text was updated successfully, but these errors were encountered: