WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#47177 closed defect (bug) (fixed)

get_search_form function enhanced in 5.2 is not fully backward compatible

Reported by: sachyya sachet Owned by: 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 3 months ago.
Changing the comparand from === to ==
47177.patch (1.2 KB) - added by dkarfa 3 months ago.
47177-1.patch (1.2 KB) - added by dkarfa 3 months ago.
47177.2.patch (428.8 KB) - added by dkarfa 3 months ago.
47177.diff (429 bytes) - added by dkarfa 3 months ago.
Final fix, ignore all previous files.

Download all attachments as: .zip

Change History (10)

@sachyya sachet
3 months ago

Changing the comparand from === to ==

#1 @sachyya sachet
3 months ago

  • Keywords has-patch added

@dkarfa
3 months ago

@dkarfa
3 months ago

@dkarfa
3 months ago

@dkarfa
3 months ago

Final fix, ignore all previous files.

#2 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 5.2.1

Introduced in [44956].

#3 @SergeyBiryukov
3 months ago

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

#4 @SergeyBiryukov
3 months 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
3 months 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.