Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#47177 closed defect (bug) (fixed)

get_search_form function enhanced in 5.2 is not fully backward compatible

Reported by: sachyya-sachet's profile sachyya sachet Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.2.1 Priority: normal
Severity: normal Version: 5.2
Component: General Keywords: has-patch
Focuses: Cc:

Description

In the enhanced function, while comparing the $args with false, data types are compared too which causes the issue while passing 1 or 0. It should be compared using == rather than ===

Attachments (5)

general-template.diff (369 bytes) - added by sachyya sachet 6 years ago.
Changing the comparand from === to ==
47177.patch (1.2 KB) - added by dkarfa 6 years ago.
47177-1.patch (1.2 KB) - added by dkarfa 6 years ago.
47177.2.patch (428.8 KB) - added by dkarfa 6 years ago.
47177.diff (429 bytes) - added by dkarfa 6 years ago.
Final fix, ignore all previous files.

Download all attachments as: .zip

Change History (10)

@sachyya sachet
6 years ago

Changing the comparand from === to ==

#1 @sachyya sachet
6 years ago

  • Keywords has-patch added

@dkarfa
6 years ago

@dkarfa
6 years ago

@dkarfa
6 years ago

@dkarfa
6 years ago

Final fix, ignore all previous files.

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.2.1

Introduced in [44956].

#3 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#4 @SergeyBiryukov
6 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 45340:

Accessibility: In back-compat code added for get_search_form() in [44956], when checking the (previously boolean) $args value, account for non-strict comparison.

Props dkarfa, sachyya-sachet.
Fixes #47177. See #42057.

#5 @SergeyBiryukov
6 years ago

In 45341:

Accessibility: In back-compat code added for get_search_form() in [44956], when checking the (previously boolean) $args value, account for non-strict comparison.

Props dkarfa, sachyya-sachet.
Merges [45340] to the 5.2 branch.
Fixes #47177. See #42057.

Note: See TracTickets for help on using tickets.