From 5a45a59cb2ad61dd718bf23e3c45e3c10f24ace7 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 8 Aug 2012 06:28:57 +0000 Subject: [PATCH] Declare, document, and protect $dbuser, $dbpassword, $dbname, $dbhost and $dbh in wpdb. These properties, while protected, are still accessible thanks to the magic getter added in [21472]. props pento, nvartolomei, joelhardi. fixes #18510. git-svn-id: https://develop.svn.wordpress.org/trunk@21473 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/wp-db.php | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 3a7b368b8a..fddfbbb879 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -445,10 +445,46 @@ class wpdb { * Database Username * * @since 2.9.0 - * @access private + * @access protected * @var string */ - var $dbuser; + protected $dbuser; + + /** + * Database Password + * + * @since 3.5.0 + * @access protected + * @var string + */ + protected $dbpassword; + + /** + * Database Name + * + * @since 3.5.0 + * @access protected + * @var string + */ + protected $dbname; + + /** + * Database Host + * + * @since 3.5.0 + * @access protected + * @var string + */ + protected $dbhost; + + /** + * Database Handle + * + * @since 3.5.0 + * @access protected + * @var string + */ + protected $dbh; /** * A textual description of the last query/get_row/get_var call