Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years 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
Priority: normal Milestone: 5.2.1
Component: General Version: 5.2
Severity: normal Keywords: has-patch
Cc: Focuses:

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

Download all attachments as: .zip

Change History (10)

@sachyya sachet
7 years ago

Changing the comparand from === to ==

#1 @sachyya sachet
7 years ago

  • Keywords has-patch added

@dkarfa
7 years ago

@dkarfa
7 years ago

@dkarfa
7 years ago

@dkarfa
7 years ago

Final fix, ignore all previous files.

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review → 5.2.1

Introduced in [44956].

#3 @SergeyBiryukov
7 years ago

  • Owner set to SergeyBiryukov
  • Status new → reviewing

#4 @SergeyBiryukov
7 years ago

  • Resolution → fixed
  • Status reviewing → 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
7 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.