Make WordPress Core

Opened 8 years ago

Closed 8 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.

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

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

8 years ago

check if $value is undeclared

#2 @ryan
8 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.