Skip to content
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

L8.45 - Undefined index: column #37581

Closed
rentalhost opened this issue Jun 3, 2021 · 6 comments · Fixed by #37582
Closed

L8.45 - Undefined index: column #37581

rentalhost opened this issue Jun 3, 2021 · 6 comments · Fixed by #37582

Comments

@rentalhost
Copy link
Contributor

  • Laravel Version: 8.45.0
  • Database Driver & Version: MariaDB 10.3 and 10.5

Description:

After update Laravel from 8.44 to 8.45 I am receiving this error: "undefined index: column". It happens here:

7ad6ba2#diff-2ed94a0ea151404a12f3c0d52ae9fb5742348578ec4a8ff79d079fa598ff145dR1988

Steps To Reproduce:

@toyi
Copy link

toyi commented Jun 3, 2021

Same problem here, locking at 8.44 until this is fixed, I'm sure it'll be quick.

@taylorotwell
Copy link
Member

Will revert that change now.

@Javdu10
Copy link
Contributor

Javdu10 commented Jun 3, 2021

hi @rentalhost, @toyi ,
Firstly sorry for that i'm not aware of all the inner workings of the framework,
Would you share with me when this kind of scenario happen, what part in your code broke?
When unionOrders or orders is initialised , is an array, has elements but don't have a column attribute?
Thanks! You can PM me on Discord if you want to share more info: Jav#7775

@rentalhost
Copy link
Contributor Author

@Javdu10 I could not reproduces it now, but by checking my source code, maybe it is related to orderByRaw() usage.

@toyi
Copy link

toyi commented Jun 3, 2021

@Javdu10 I was about to dig in to reproduce this bug but it seems you found a fix :)

@Javdu10
Copy link
Contributor

Javdu10 commented Jun 3, 2021

Ohh that makes sense! I've added an isset(), so it should work properly now, I wasn't aware of this edge case, thank you!

taylorotwell added a commit that referenced this issue Jun 4, 2021
* Columns in the order by list must be unique

MySql is ok with it, but SqlServer error out.
See a similar issue here: laravel/nova-issues#1621

* override with next call

* Update Builder.php

* fix: "undefined index: column" from #37581

* add a regression test

Co-authored-by: Taylor Otwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants