Make WordPress Core

Opened 16 years ago

Closed 16 years ago

#13029 closed defect (bug) (fixed)

Evaluation of undeclared variable in get_site_option

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

Description

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 16 years ago.
check if $value is undeclared

Download all attachments as: .zip

Change History (3)

@niallkennedy
16 years ago

check if $value is undeclared

#2 @ryan
16 years ago

  • Resolutionfixed
  • Status newclosed

That commit should be props niallkennedy. My bad.

Note: See TracTickets for help on using tickets.