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

Fix ORDER BY clauses being reset by count_all_results() #5282

Merged
merged 1 commit into from
Oct 3, 2017
Merged

Fix ORDER BY clauses being reset by count_all_results() #5282

merged 1 commit into from
Oct 3, 2017

Conversation

pgee70
Copy link
Contributor

@pgee70 pgee70 commented Oct 2, 2017

recent changes broke query ordering giving a warning in line 1238 = '$this->qb_cache_orderby = array_merge($this->qb_cache_orderby, $qb_orderby);'
the warning message was about array_merge not working with a NULL object.

this was because on subsequent re-queries, the qb_cache_orderby was set to NULL not Array() as it is should have been. See the initial instantiation of the $this->qb_cache_orderby
This PR should fix it.

recent changes broke query ordering giving a warning in line 1238 = '$this->qb_cache_orderby = array_merge($this->qb_cache_orderby, $qb_orderby);'
this was because on subsequent re-queries, the qb_cache_orderby was set to NULL not Array() as it is should be (and is instantiated originally .
@narfbg narfbg added this to the 3.1.7 milestone Oct 3, 2017
@narfbg
Copy link
Contributor

narfbg commented Oct 3, 2017

The "recent changes" in question is the patch for #5168.

But while I can confirm that this is a bug, the warning itself is only a symptom. What's the actual effect that this has on queries? How do they break?

@pgee70
Copy link
Contributor Author

pgee70 commented Oct 3, 2017 via email

@narfbg narfbg changed the title Update DB_query_builder.php Fix ORDER BY clauses being reset by count_all_results() Oct 3, 2017
@narfbg narfbg merged commit 308eb0f into bcit-ci:3.1-stable Oct 3, 2017
@pgee70 pgee70 deleted the patch-1 branch October 3, 2017 11:19
@narfbg
Copy link
Contributor

narfbg commented Oct 3, 2017

Ok, thanks!

Changed the title to reflect what the PR is actually about. As a side note, please target the develop branch unless you know that something is only relevant to 3.1-stable. We do backport all PR patches manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants