#1624 closed defect (bug) (fixed)
legacy bug in bb_get_options
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 0.9.0.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Back-end | Keywords: | |
| Cc: |
Description
There is a legacy bug in bb_get_options in the 0.9 branch that I just noticed. I doubt it will ever be fixed but I am sharing it on the record for the thousands of people who will be continuing to use 0.9 for years.
check bb-includes\functions.php around line 1464
when 'url' is requested, it tries to properly use 'uri'
HOWEVER, there is a missing break; afterwards, so it falls through and returns the table_prefix instead. Hopefully all legacy plugins/code never does a bb_options('url') or bb_get_options('url')
function bb_get_option( $option ) {
global $bb;
switch ( $option ) :
case 'language':
$r = str_replace('_', '-', get_locale());
break;
case 'text_direction':
global $bb_locale;
$r = $bb_locale->text_direction;
break;
case 'version' :
return '0.9.0.6'; // Don't filter
break;
case 'bb_db_version' :
return '1467'; // Don't filter
break;
case 'html_type' :
$r = 'text/html';
break;
case 'charset' :
$r = 'UTF-8';
break;
case 'url' :
$option = 'uri';
case 'bb_table_prefix' :
case 'table_prefix' :
global $bbdb;
return $bbdb->prefix; // Don't filter;
break;
it should read:
case 'url' : $option = 'uri'; break;
So never request 'url' in bbPress options, always request 'uri' instead.
Confirmed. Incoming fix.