Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#13029 closed defect (bug) (fixed)

Evaluation of undeclared variable in get_site_option

Reported by: niallkennedy Owned by:
Milestone: 3.0 Priority: high
Severity: normal Version: 3.0
Component: General Keywords: has-patch
Focuses: Cc:


If the get_site_option function operates in a multisite environment with a use_cache parameter of false then $value will be undeclared and therefore not match a strict comparison of false.

Current code assumes $value will be set to false based on a wp_cache_get call that never happens.

If $value is never set treat as if it was false.

Attachments (1)

functions.diff (515 bytes) - added by niallkennedy 6 years ago.
check if $value is undeclared

Download all attachments as: .zip

Change History (3)

6 years ago

check if $value is undeclared

#2 @ryan
6 years ago

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

That commit should be props niallkennedy. My bad.

Note: See TracTickets for help on using tickets.