WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 7 months ago

#39048 new defect (bug)

undefined return array var being passed to wp_parse_str

Reported by: pbearne Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:
PR Number:

Description

I spotted that the array being passed by ref is not be set in all places in core

This patch fixes that

#WCUS contrib day

Attachments (3)

wp_parse_str_undifeied_vars.patch (2.7 KB) - added by pbearne 3 years ago.
wp_parse_str_undifeied_vars.2.patch (2.2 KB) - added by pbearne 3 years ago.
fixed patch remove other changes
wp_parse_str_undifeied_vars.3.patch (2.3 KB) - added by pbearne 3 years ago.
fix the if block

Download all attachments as: .zip

Change History (5)

@pbearne
3 years ago

fixed patch remove other changes

#1 @adamsilverstein
3 years ago

@pbearne Thanks for the patch. I'm not certain I understand what issue this is resolving. Does not setting these arrays beforehand cause a PHP warning or error? A unit test demonstrating that would be immensely helpful here.

Note that generally code refactoring should not be done just because we can.

#2 @swissspidy
3 years ago

  • Version trunk deleted

@pbearne
3 years ago

fix the if block

Note: See TracTickets for help on using tickets.