Ensure that DB connection is active at start of User::updateKeys() and Foreign_user::updateKeys(); calls to $this->_quote() require a live connection object and don't lazy-initialize themselves.

May fix WSOD when changing incoming email address.
This commit is contained in:
Brion Vibber 2010-03-18 09:22:08 -07:00
parent 425ddcaa26
commit 515cdf28a8
2 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class Foreign_user extends Memcached_DataObject
function updateKeys(&$orig)
{
$this->_connect();
$parts = array();
foreach (array('id', 'service', 'uri', 'nickname') as $k) {
if (strcmp($this->$k, $orig->$k) != 0) {

View File

@ -91,6 +91,7 @@ class User extends Memcached_DataObject
function updateKeys(&$orig)
{
$this->_connect();
$parts = array();
foreach (array('nickname', 'email', 'jabber', 'incomingemail', 'sms', 'carrier', 'smsemail', 'language', 'timezone') as $k) {
if (strcmp($this->$k, $orig->$k) != 0) {