Skip to content

Instantly share code, notes, and snippets.

@cmcculloh
Created December 30, 2011 04:35
Show Gist options
  • Save cmcculloh/1537894 to your computer and use it in GitHub Desktop.
Save cmcculloh/1537894 to your computer and use it in GitHub Desktop.
Fix for WP phpBB Bridge Warning: mysql_set_charset() expects parameter 2 to be resource, boolean given in wpbb_topics_widget.php on line 149
//all of this replaces line 147 (NOT 149!!)
$db_conn_uri = $dbhost;
if(isset($dbport) && !empty($dbport)){
$db_conn_uri .= ":" . $dbport;//could be improved by adding a check to make sure that $dbport doesn't start with ":" before tagging that on for them
}
$cn = @mysql_pconnect($db_conn_uri, $dbuser, $dbpasswd);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment