WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#35821 closed defect (bug) (wontfix)

WP_Query( array( 'name' => '' ) )

Reported by: ChiefAlchemist Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.2
Component: Query Keywords:
Focuses: Cc:
PR Number:

Description

Similar to the other bug I just reported.

When in the query is: 'name' => I'm getting results.

Mind you, in the DB, 'name' should never be . Therefore such a query should return nothing. It doesn't' return nothing ;)

p.s. If there a reason why WP_Query() isn't in the component select below?

Change History (1)

#1 @boonebgorges
4 years ago

  • Component changed from Database to Query
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Related: #35820 ("other bug I just reported").

Mind you, in the DB, 'name' should never be . Therefore such a query should return nothing. It doesn't' return nothing ;)

post_name can be empty, and in fact is empty, in the case of post drafts. For this reason, I think the back-compat concerns are greater in this case than in the case of 0, which can never be a valid post ID.

p.s. If there a reason why WP_Query() isn't in the component select below?

It's "Query".

Note: See TracTickets for help on using tickets.