Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#47392 closed defect (bug) (fixed)

Update date_query condition to verify param data in proper order

Reported by: vishalkakadiya Owned by: SergeyBiryukov
Priority: normal Milestone: 5.3
Component: Date/Time Version:
Severity: normal Keywords: has-patch
Cc: Focuses:

Description (last modified by SergeyBiryukov)

Here the code is doing something that it's using array values like $date_query['relation'] first then it's checking for ! is_array which looking not proper and also we are checking empty value late so I have updated them in this PR.

Let me know if any other changes needed here. Thanks!

Attachments (1)

47392.diff​ (1.0 KB ) - added by vishalkakadiya 7 years ago.

Download all attachments as: .zip

Change History (7)

@vishalkakadiya
7 years ago

#1 @mukesh27
7 years ago

  • Component General → Date/Time
  • Version trunk

@vishalkakadiya good cache. i have tested above patch it working fine for me.

@desrosj can you please check it.

This ticket was mentioned in ​Slack in #core-datetime by rarst. ​View the logs.


7 years ago

#3 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review → 5.3
  • Owner set to SergeyBiryukov
  • Status new → reviewing

#4 @SergeyBiryukov
7 years ago

Introduced in [29923].

#5 @SergeyBiryukov
7 years ago

  • Description modified (diff)

#6 @SergeyBiryukov
7 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 45850:

Date/Time: In WP_Date_Query::__construct(), return early if $date_query is empty or not an array.

Props vishalkakadiya.
Fixes #47392.

Note: See TracTickets for help on using tickets.