Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#35821 closed defect (bug) (wontfix)

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

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

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
11 years ago

  • Component Database → Query
  • Milestone Awaiting Review
  • Resolution → wontfix
  • Status new → 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.